mikebronner / laravel-model-caching

Eloquent model-caching made easy.
MIT License
2.26k stars 215 forks source link

Declaration of Cachable::newBelongsToMany should be compatible with Model::newBelongsToMany #380

Closed pokemonhan closed 3 years ago

pokemonhan commented 3 years ago

Describe the bug I got the below error when I installed on laravel 8.

Warning: Declaration of GeneaLabs\LaravelModelCaching\Traits\Cachable::newBelongsToMany(GeneaLabs\LaravelModelCaching\EloquentBuilder $query, Illuminate\Database\Eloquent\Model $parent, $table, $foreignPivotKey, $relatedPivotKey, $parentKey, $relatedKey, $relationName = NULL) should be compatible with Illuminate\Database\Eloquent\Model::newBelongsToMany(Illuminate\Database\Eloquent\Builder $query, Illuminate\Database\Eloquent\Model $parent, $table, $foreignPivotKey, $relatedPivotKey, $parentKey, $relatedKey, $relationName = NULL) in /var/www/jianghu_entertain/app/Models/BaseModel.php on line 14

image image

Environment

Additional context image

mikebronner commented 3 years ago

Hi @harrisdt15f, just curious, why did you close this? I want to make sure I have everything covered.

Thanks :)