-
Hello, Do you know if there's a way to apply a I got booking events and I automatically hide past events, but in the administration part, I'd like to show them all (and their related attendants) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I did post an issue and get a anwser from @danharrin The feature is missing and will be added to the next release. Meanwhile, he told me I was able to override the getQuery method and fetch all my models from the list page public static function getQuery()
{
return static::getModel()::query()->withoutGlobalScopes();
} On the edit page, I also was able to disable the global scopes by overriding the resolveRecord method protected function resolveRecord($key)
{
$model = static::getModel();
$record = $model::withoutGlobalScopes()->findOrFail($key);
if ($record === null) {
throw (new ModelNotFoundException())->setModel($model, [$key]);
}
return $record;
} |
Beta Was this translation helpful? Give feedback.
I did post an issue and get a anwser from @danharrin
The feature is missing and will be added to the next release.
Meanwhile, he told me I was able to override the getQuery method and fetch all my models from the list page
On the edit page, I also was able to disable the global scopes by overriding the resolveRecord method