- Laravel Version: 5.7
- PHP Version: 7.2
- Database Driver & Version: MySQL 5.7
Description:
I use relations like this
public function experts()
{
return $this->belongsToMany(Expert::class, 'app_experts', 'app_id', 'expert_id')
->withTrashed();
}
All is ok, but php artisan code:analyse tells me that:
Call to an undefined method Illuminate\Database\Eloquent\Relations\BelongsToMany::withTrashed()
What's wrong with it?
If is's important Expert
model use SoftDeletes
trait.