public function update(Request $request)
    {
        $this->authorize('browse_database');

        $table = json_decode($request->table, true);

        try {
            DatabaseUpdater::update($table);
            // TODO: synch BREAD with Table
            // $this->cleanOldAndCreateNew($request->original_name, $request->name);
            event(new TableUpdated($table));
        } catch (Exception $e) {
            return back()->with($this->alertException($e))->withInput();
        }

        return redirect()
               ->route('voyager.database.index')
               ->with($this->alertSuccess(__('voyager::database.success_create_table', ['table' => $table['name']])));
    }
public function update(Request $request)
    {
        $this->authorize('browse_database');

        $table = json_decode($request->table, true);

        try {
            DatabaseUpdater::update($table);
            // TODO: synch BREAD with Table
            // $this->cleanOldAndCreateNew($request->original_name, $request->name);
            event(new TableUpdated($table));
        } catch (Exception $e) {
            return back()->with($this->alertException($e))->withInput();
        }

        return redirect()
               ->route('voyager.database.index')
               ->with($this->alertSuccess(__('voyager::database.success_create_table', ['table' => $table['name']])));
    }
public function update ( Request $ request ) { $ this -> authorize ( 'browse_database' ) ; $ table = json_decode ( $ request -> table , true ) ; try { DatabaseUpdater :: update ( $ table ) ; // TODO: synch BREAD with Table // $this->cleanOldAndCreateNew($request->original_name, $request->name); event ( new TableUpdated ( $ table ) ) ; } catch ( Exception $ e ) { return back ( ) -> with ( $ this -> alertException ( $ e ) ) -> withInput ( ) ; } return redirect ( ) -> route ( 'voyager.database.index' ) -> with ( $ this -> alertSuccess ( __ ( 'voyager::database.success_create_table' , [ 'table' => $ table [ 'name' ] ] ) ) ) ; }
Update database table.

@param \Illuminate\Http\Request $request

@return \Illuminate\Http\RedirectResponse
Update database table .