src/Flipbox/OrmManager/Consoles/ModelDetail.php
protected function showModifier(Model $model)
    {
        $name = $this->manager->getClassName($model);

        $this->title("Modifier of Model {$name}: ");

        $modifiers = [
            'mutators' => $this->manager->getMutators($model),
            'accessors' => $this->manager->getAccessors($model),
            'scopes' => $this->manager->getScopes($model),
        ];

         $rows = [];

        foreach (max($modifiers) as $modifier) {
            foreach (['mutator', 'accessor', 'scope'] as $type) {
                $$type = '';
                $types = &$modifiers[Str::plural($type)];

                if ($types->count() > 0) {
                    $$type = $this->paintString($types->first()->getName(), 'brown');
                    unset($types[0]);
                }
            }

            $rows[] = [$mutator, $accessor, $scope];
        }

        $headers = ['mutator', 'accessor', 'scope'];

        $this->table($headers, $rows);
        
    }
protected function showModifier(Model $model)
    {
        $name = $this->manager->getClassName($model);

        $this->title("Modifier of Model {$name}: ");

        $modifiers = [
            'mutators' => $this->manager->getMutators($model),
            'accessors' => $this->manager->getAccessors($model),
            'scopes' => $this->manager->getScopes($model),
        ];

         $rows = [];

        foreach (max($modifiers) as $modifier) {
            foreach (['mutator', 'accessor', 'scope'] as $type) {
                $$type = '';
                $types = &$modifiers[Str::plural($type)];

                if ($types->count() > 0) {
                    $$type = $this->paintString($types->first()->getName(), 'brown');
                    unset($types[0]);
                }
            }

            $rows[] = [$mutator, $accessor, $scope];
        }

        $headers = ['mutator', 'accessor', 'scope'];

        $this->table($headers, $rows);
        
    }
protected function showModifier ( Model $ model ) { $ name = $ this -> manager -> getClassName ( $ model ) ; $ this -> title ( "Modifier of Model {$name}: " ) ; $ modifiers = [ 'mutators' => $ this -> manager -> getMutators ( $ model ) , 'accessors' => $ this -> manager -> getAccessors ( $ model ) , 'scopes' => $ this -> manager -> getScopes ( $ model ) , ] ; $ rows = [ ] ; foreach ( max ( $ modifiers ) as $ modifier ) { foreach ( [ 'mutator' , 'accessor' , 'scope' ] as $ type ) { $ $ type = '' ; $ types = & $ modifiers [ Str :: plural ( $ type ) ] ; if ( $ types -> count ( ) > 0 ) { $ $ type = $ this -> paintString ( $ types -> first ( ) -> getName ( ) , 'brown' ) ; unset ( $ types [ 0 ] ) ; } } $ rows [ ] = [ $ mutator , $ accessor , $ scope ] ; } $ headers = [ 'mutator' , 'accessor' , 'scope' ] ; $ this -> table ( $ headers , $ rows ) ; }
show model modifier

@param Model $model
@return void
show model modifier