src/Mutable.php
public static function bootMutable()
    {
        if (!isset(static::$attributeMutator)) {
            if (function_exists('app') && app()->bound('eloquence.mutator')) {
                static::setAttributeMutator(app('eloquence.mutator'));
            } else {
                static::setAttributeMutator(new Mutator);
            }
        }
        
        $hooks = new Hooks;

        foreach (['setAttribute', 'getAttribute', 'toArray'] as $method) {
            static::hook($method, $hooks->{$method}());
        }
    }
public static function bootMutable()
    {
        if (!isset(static::$attributeMutator)) {
            if (function_exists('app') && app()->bound('eloquence.mutator')) {
                static::setAttributeMutator(app('eloquence.mutator'));
            } else {
                static::setAttributeMutator(new Mutator);
            }
        }
        
        $hooks = new Hooks;

        foreach (['setAttribute', 'getAttribute', 'toArray'] as $method) {
            static::hook($method, $hooks->{$method}());
        }
    }
public static function bootMutable ( ) { if ( ! isset ( static :: $ attributeMutator ) ) { if ( function_exists ( 'app' ) && app ( ) -> bound ( 'eloquence.mutator' ) ) { static :: setAttributeMutator ( app ( 'eloquence.mutator' ) ) ; } else { static :: setAttributeMutator ( new Mutator ) ; } } $ hooks = new Hooks ; foreach ( [ 'setAttribute' , 'getAttribute' , 'toArray' ] as $ method ) { static :: hook ( $ method , $ hooks -> { $ method } ( ) ) ; } }
Register hooks for the trait.

@codeCoverageIgnore

@return void
Register hooks for the trait .