I get this error when trying to add your package using composer:
Declaration of
Jenssegers\Mongodb\Eloquent\HybridRelations::belongsToMany(
$related,
$collection = NULL,
$foreignKey = NULL,
$otherKey = NULL,
$relation = NULL
)
should be compatible with
Illuminate\Database\Eloquent\Model::belongsToMany(
$related,
$table = NULL,
$foreignPivotKey = NULL,
$relatedPivotKey = NULL,
$parentKey = NULL,
$relatedKey = NULL,
$relation = NULL
)
I have Laravel 5.5.7
Latest stable version of this package does not support L5.5 for now. An alpha release (v3.3.0) is available for L5.5 support. You can try that.
https://github.com/jenssegers/laravel-mongodb/tree/v3.3.0-alpha
for 5.5 use alpha release:
$ composer require jenssegers/mongodb:^3.3.0-alpha
@ajaybhargav Thanks, it fixed my issue.
Most helpful comment
for 5.5 use alpha release:
$ composer require jenssegers/mongodb:^3.3.0-alpha