trait HasGlobalScopes (View source)
static mixed | addGlobalScope(Scope|Closure|string $scope, Closure $implementation = null) Register a new global scope on the model. | |
static bool | hasGlobalScope(Scope|string $scope) Determine if a model has a global scope. | |
static Scope|Closure|null | getGlobalScope(Scope|string $scope) Get a global scope registered with the model. | |
array | getGlobalScopes() Get the global scopes for this class instance. |
Register a new global scope on the model.
Determine if a model has a global scope.
Get a global scope registered with the model.
Get the global scopes for this class instance.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.8/Illuminate/Database/Eloquent/Concerns/HasGlobalScopes.html