payable polymorphic relationship on the active record and on that relationship check if the consulable_type is of a specific class.
Tables\Filters\Filter::make('consult')
->query(
function (Builder $query) {
return $query->whereHas('payable', function ($query) {
$query->where('consultable_type', '=', WardConsult::class);
});
}
),
Class "App\Models\Unknown" not found. Does anyone know an active example or could help me fix this code?