mamdouh asked this 3 years ago

MongoDB migrations: Declaration of Jenssegers\Mongodb\Schema\Blueprint::primary() not compatible

I am using Laravel 5.3 with jenssegers mongodb package. I am getting this error when running

php artisan migrate

 

  [ErrorException]

  Declaration of Jenssegers\Mongodb\Schema\Blueprint::primary() should be compatible with Illuminate\Database\Schema\Blueprint::primary($columns, $name = NULL, $algorithm = NULL)

 


Best Answer by Fischer
2 likes

This issue was fixed in 3.1.x release.

To get the latest compatible version,run

composer update

Fischer 3 years ago

What version of the package are you using?

mamdouh 3 years ago

I have "jenssegers/mongodb": "^3.0"

Laravel version is 5.3