public function setAttribute()
    {
        return function ($next, $value, $args) {
            $key = $args->get('key');

            if (!$this->hasColumn($key) && $this->allowsMeta($key) && !$this->hasSetMutator($key)) {
                return $this->setMeta($key, $value);
            }

            return $next($value, $args);
        };
    }
public function setAttribute()
    {
        return function ($next, $value, $args) {
            $key = $args->get('key');

            if (!$this->hasColumn($key) && $this->allowsMeta($key) && !$this->hasSetMutator($key)) {
                return $this->setMeta($key, $value);
            }

            return $next($value, $args);
        };
    }
public function setAttribute ( ) { return function ( $ next , $ value , $ args ) { $ key = $ args -> get ( 'key' ) ; if ( ! $ this -> hasColumn ( $ key ) && $ this -> allowsMeta ( $ key ) && ! $ this -> hasSetMutator ( $ key ) ) { return $ this -> setMeta ( $ key , $ value ) ; } return $ next ( $ value , $ args ) ; } ; }
Register hook on setAttribute method.

@return \Closure
Register hook on setAttribute method .