src/Domain/Traits/CheckableTrait.php
protected function applyDomainRules($action, $input = [], $original = [])
    {
        $domainRulesMethod = 'domainRulesOn'.ucfirst($action);

        // Pass in original model if we are updating
        if ($action = 'update') {
            $this->{ $domainRulesMethod }($input, $original);
        } else {
            $this->{ $domainRulesMethod }($input);
        }
    }
protected function applyDomainRules($action, $input = [], $original = [])
    {
        $domainRulesMethod = 'domainRulesOn'.ucfirst($action);

        // Pass in original model if we are updating
        if ($action = 'update') {
            $this->{ $domainRulesMethod }($input, $original);
        } else {
            $this->{ $domainRulesMethod }($input);
        }
    }
protected function applyDomainRules ( $ action , $ input = [ ] , $ original = [ ] ) { $ domainRulesMethod = 'domainRulesOn' . ucfirst ( $ action ) ; // Pass in original model if we are updating if ( $ action = 'update' ) { $ this -> { $ domainRulesMethod } ( $ input , $ original ) ; } else { $ this -> { $ domainRulesMethod } ( $ input ) ; } }
Apply domain rules.
@param  string  $action      Requested action to check
@param  array   $input       Input data
@param  array   $original    Original item before modification
Apply domain rules .