The expression return $builder->orderBy('likes_count', 'desc') could return the type Illuminate\Database\Query\Builder which is incompatible with the type-hinted return Illuminate\Database\Eloquent\Builder. Consider adding an additional type-check to rule them out.
Loading history...
27
}
28
29
public function scopeMostReplied(Builder $builder): Builder
The expression return $builder->orderBy...hildren_count', 'desc') could return the type Illuminate\Database\Query\Builder which is incompatible with the type-hinted return Illuminate\Database\Eloquent\Builder. Consider adding an additional type-check to rule them out.
Loading history...
32
}
33
34
public function scopeApproved(Builder $builder): Builder
35
{
36
return $builder->where('is_approved', true);
37
}
38
39
public function scopePending(Builder $builder): Builder