Documentation

HasGlobalScopes

Table of Contents

addGlobalScope()  : mixed
Register a new global scope on the model.
getGlobalScope()  : Scope|Closure|null
Get a global scope registered with the model.
getGlobalScopes()  : array<string|int, mixed>
Get the global scopes for this class instance.
hasGlobalScope()  : bool
Determine if a model has a global scope.

Methods

addGlobalScope()

Register a new global scope on the model.

public static addGlobalScope(Scope|Closure|string $scope[, Closure|null $implementation = null ]) : mixed
Parameters
$scope : Scope|Closure|string
$implementation : Closure|null = null
Tags
throws
InvalidArgumentException
Return values
mixed

getGlobalScope()

Get a global scope registered with the model.

public static getGlobalScope(Scope|string $scope) : Scope|Closure|null
Parameters
$scope : Scope|string
Return values
Scope|Closure|null

getGlobalScopes()

Get the global scopes for this class instance.

public getGlobalScopes() : array<string|int, mixed>
Return values
array<string|int, mixed>

hasGlobalScope()

Determine if a model has a global scope.

public static hasGlobalScope(Scope|string $scope) : bool
Parameters
$scope : Scope|string
Return values
bool

Search results