public function show($table)
    {
        $this->authorize('browse_database');

        $additional_attributes = [];
        $model_name = Voyager::model('DataType')->where('name', $table)->pluck('model_name')->first();
        if (isset($model_name)) {
            $model = app($model_name);
            if (isset($model->additional_attributes)) {
                foreach ($model->additional_attributes as $attribute) {
                    $additional_attributes[$attribute] = [];
                }
            }
        }

        return response()->json(collect(SchemaManager::describeTable($table))->merge($additional_attributes));
    }
public function show($table)
    {
        $this->authorize('browse_database');

        $additional_attributes = [];
        $model_name = Voyager::model('DataType')->where('name', $table)->pluck('model_name')->first();
        if (isset($model_name)) {
            $model = app($model_name);
            if (isset($model->additional_attributes)) {
                foreach ($model->additional_attributes as $attribute) {
                    $additional_attributes[$attribute] = [];
                }
            }
        }

        return response()->json(collect(SchemaManager::describeTable($table))->merge($additional_attributes));
    }
public function show ( $ table ) { $ this -> authorize ( 'browse_database' ) ; $ additional_attributes = [ ] ; $ model_name = Voyager :: model ( 'DataType' ) -> where ( 'name' , $ table ) -> pluck ( 'model_name' ) -> first ( ) ; if ( isset ( $ model_name ) ) { $ model = app ( $ model_name ) ; if ( isset ( $ model -> additional_attributes ) ) { foreach ( $ model -> additional_attributes as $ attribute ) { $ additional_attributes [ $ attribute ] = [ ] ; } } } return response ( ) -> json ( collect ( SchemaManager :: describeTable ( $ table ) ) -> merge ( $ additional_attributes ) ) ; }
Show table.

@param string $table

@return JSON
Show table .