public static scope ( string $name = null, Closure $closure = null ) : mixed | ||
$name | string | Name of the scope to use. |
$closure | Closure | A closure to execute inside the scope. |
return | mixed | Returns the previous scope if if `$name` is not null and `$closure` is null, returns the default used scope if `$name` is null, otherwise returns `null`. |