Register a new global scope.
public withGlobalScope ( string $identifier, Illuminate\Database\Eloquent\Scope | Closure $scope ) | ||
$identifier | string | |
$scope | Illuminate\Database\Eloquent\Scope | Closure |
/** * Register a new global scope. * * @param string $identifier * @param \Illuminate\Database\Eloquent\Scope|\Closure $scope * @return $this * @static */ public static function withGlobalScope($identifier, $scope) { return \Illuminate\Database\Eloquent\Builder::withGlobalScope($identifier, $scope); }