Laravel-mongodb: Declaration of Jenssegers\Mongodb\Relations\BelongsToMany::create should be compatible with...

Created on 3 Aug 2017  路  4Comments  路  Source: jenssegers/laravel-mongodb

Uncaught Exception ErrorException: "Declaration of Jenssegers\Mongodb\Relations\BelongsToMany::create(array $attributes, array $joining = Array, $touch = true) should be compatible with Illuminate\Database\Eloquent\Relations\BelongsToMany::create(array $attributes = Array, array $joining = Array, $touch = true)"

https://github.com/jenssegers/laravel-mongodb/blob/v3.2.2/src/Jenssegers/Mongodb/Relations/BelongsToMany.php#L94
https://github.com/laravel/framework/blob/5.4/src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php#L743

array $attributes vs array $attributes = []

added https://github.com/laravel/framework/commit/f59f6b29539fe149841c1f88bb5ad3d97e0403c0#diff-fac59ee2778e54567a539e9140a1a42cR743

Most helpful comment

This still hasn't been fixed in laravel 5.5.x either :/

All 4 comments

It's not fixed on Lumen 5.5. On lumen 5.4, it's working fine.

This still hasn't been fixed in laravel 5.5.x either :/

Any update on the fix @jenssegers ?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pirmax picture pirmax  路  3Comments

geofflancaster picture geofflancaster  路  3Comments

Vasiliy-Bondarenko picture Vasiliy-Bondarenko  路  3Comments

sanjay1688 picture sanjay1688  路  3Comments

tomartailored picture tomartailored  路  3Comments