trait
Illuminate
/
Database
/
Eloquent
/
Concerns
/
HasGlobalScopes
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.
HasGlobalScopes
Methods
public
static
addGlobalScope ( $scope , $implementation ) : mixed
Register a new global scope on the model.
Parameters
public
static
hasGlobalScope ( $scope ) : bool
Determine if a model has a global scope.
Parameters
- $scope Scope |string
public
static
getGlobalScope ( $scope ) : Scope |Closure |null
Get a global scope registered with the model.
Parameters
- $scope Scope |string
public
static
getAllGlobalScopes ( ) : array
Get all of the global scopes that are currently registered.
public
static
setAllGlobalScopes ( $scopes ) : void
Set the current global scopes.
Parameters
- $scopes array
public
getGlobalScopes ( ) : array
Get the global scopes for this class instance.