protected function show($user, string $modelName)
    {
        $method = "{$modelName}s";
        $methodTitle = ucfirst($method);

        if (! $user->$method) {
            $this->warn("User not use Has{$methodTitle}Trait!");
            return;
        }

        echo "{$methodTitle}:", PHP_EOL;

        $data = $this->prepareData($user->$method->toArray());

        if ($user->$method->count()) {
            $this->table(['ID', ucfirst($modelName), 'Created At', 'Updated At'], $data);
        } else {
            $this->warn("Not found any {$method}!");
        }
    }
protected function show($user, string $modelName)
    {
        $method = "{$modelName}s";
        $methodTitle = ucfirst($method);

        if (! $user->$method) {
            $this->warn("User not use Has{$methodTitle}Trait!");
            return;
        }

        echo "{$methodTitle}:", PHP_EOL;

        $data = $this->prepareData($user->$method->toArray());

        if ($user->$method->count()) {
            $this->table(['ID', ucfirst($modelName), 'Created At', 'Updated At'], $data);
        } else {
            $this->warn("Not found any {$method}!");
        }
    }
protected function show ( $ user , string $ modelName ) { $ method = "{$modelName}s" ; $ methodTitle = ucfirst ( $ method ) ; if ( ! $ user -> $ method ) { $ this -> warn ( "User not use Has{$methodTitle}Trait!" ) ; return ; } echo "{$methodTitle}:" , PHP_EOL ; $ data = $ this -> prepareData ( $ user -> $ method -> toArray ( ) ) ; if ( $ user -> $ method -> count ( ) ) { $ this -> table ( [ 'ID' , ucfirst ( $ modelName ) , 'Created At' , 'Updated At' ] , $ data ) ; } else { $ this -> warn ( "Not found any {$method}!" ) ; } }
Show roles or permissions

@param $user
@param string $modelName
Show roles or permissions