mamdouh asked this 2 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)


Fischer 2 years ago

What version of the package are you using?

mamdouh 2 years ago

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

Laravel version is 5.3

Best Answer by Fischer

This issue was fixed in 3.1.x release.

To get the latest compatible version,run

composer update