-
Notifications
You must be signed in to change notification settings - Fork 71
Open
Labels
Description
When using whereHas
in a query builder there is an error message:
TYPE ERROR Spiritix\LadaCache\Reflector::getTablesFromWhere(): Argument #1 ($queryBuilder) must be of type Spiritix\LadaCache\Database\QueryBuilder, Illuminate\Database\Query\Builder given, called in vendor/spiritix/lada-cache/src/Spiritix/LadaCache/Reflector.php on line 145 in vendor/psy/psysh/src/Exception/TypeErrorException.php on line 53.
Code:
Expert::whereHas('users', function ($query) {
$query->whereNotNull('users.updated_at');
})->get();
Relationship from model 'Expert' to model 'User':
public function users(): BelongsToMany
{
return $this->belongsToMany(User::class, 'user_expert')
->using(ExpertCategoryExpert::class);
}