protected function callPolicyBefore($policy, $user, $ability, $arguments)
    {
        if (! method_exists($policy, 'before')) {
            return;
        }

        if ($this->canBeCalledWithUser($user, $policy, 'before')) {
            return $policy->before($user, $ability, ...$arguments);
        }
    }
protected function callPolicyBefore($policy, $user, $ability, $arguments)
    {
        if (! method_exists($policy, 'before')) {
            return;
        }

        if ($this->canBeCalledWithUser($user, $policy, 'before')) {
            return $policy->before($user, $ability, ...$arguments);
        }
    }
protected function callPolicyBefore ( $ policy , $ user , $ ability , $ arguments ) { if ( ! method_exists ( $ policy , 'before' ) ) { return ; } if ( $ this -> canBeCalledWithUser ( $ user , $ policy , 'before' ) ) { return $ policy -> before ( $ user , $ ability , ... $ arguments ) ; } }
Call the "before" method on the given policy, if applicable.

@param  mixed  $policy
@param  \Illuminate\Contracts\Auth\Authenticatable  $user
@param  string  $ability
@param  array  $arguments
@return mixed
Call the before method on the given policy if applicable .