public function scope($scope)
    {
        $beforeMethod = 'before'.ucfirst($scope);
        $afterMethod  = 'after'.ucfirst($scope);
        if ( method_exists($this, $beforeMethod) )
        {
            call_user_func([$this,$beforeMethod]);
        }
        $this->rules = $this->resolveScope($scope);
        $this->attributes = $this->resolveAttributes($scope);
        $this->messages = $this->resolveMessages($scope);


        if ( method_exists($this, $afterMethod) )
        {
            call_user_func([$this,$afterMethod]);
        }

        return $this;
    }
public function scope($scope)
    {
        $beforeMethod = 'before'.ucfirst($scope);
        $afterMethod  = 'after'.ucfirst($scope);
        if ( method_exists($this, $beforeMethod) )
        {
            call_user_func([$this,$beforeMethod]);
        }
        $this->rules = $this->resolveScope($scope);
        $this->attributes = $this->resolveAttributes($scope);
        $this->messages = $this->resolveMessages($scope);


        if ( method_exists($this, $afterMethod) )
        {
            call_user_func([$this,$afterMethod]);
        }

        return $this;
    }
public function scope ( $ scope ) { $ beforeMethod = 'before' . ucfirst ( $ scope ) ; $ afterMethod = 'after' . ucfirst ( $ scope ) ; if ( method_exists ( $ this , $ beforeMethod ) ) { call_user_func ( [ $ this , $ beforeMethod ] ) ; } $ this -> rules = $ this -> resolveScope ( $ scope ) ; $ this -> attributes = $ this -> resolveAttributes ( $ scope ) ; $ this -> messages = $ this -> resolveMessages ( $ scope ) ; if ( method_exists ( $ this , $ afterMethod ) ) { call_user_func ( [ $ this , $ afterMethod ] ) ; } return $ this ; }
Set the scope.

@param string|array $scope
@return ValidatorAssistant
Set the scope .