mamdouh asked this 4 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



  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 4 years ago

This issue was fixed in 3.1.x release.

To get the latest compatible version,run

composer update

mamdouh 4 years ago

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

Laravel version is 5.3

Fischer 4 years ago

What version of the package are you using?