Illuminate\Database\Eloquent\Model::getGlobalScope PHP Method

getGlobalScope() public static method

Get a global scope registered with the model.
public static getGlobalScope ( Illuminate\Database\Eloquent\Scope | string $scope ) : Illuminate\Database\Eloquent\Scope | Closure | null
$scope Illuminate\Database\Eloquent\Scope | string
return Illuminate\Database\Eloquent\Scope | Closure | null
    public static function getGlobalScope($scope)
    {
        if (!is_string($scope)) {
            $scope = get_class($scope);
        }
        return Arr::get(static::$globalScopes, static::class . '.' . $scope);
    }
Model