src/Http/Controllers/VoyagerDatabaseController.php
public function update(Request $request)
    {
        Voyager::canOrFail('browse_database');

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

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

        return redirect()
               ->route('voyager.database.edit', $table['name'])
               ->with($this->alertSuccess("Successfully updated {$table['name']} table"));
    }
public function update(Request $request)
    {
        Voyager::canOrFail('browse_database');

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

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

        return redirect()
               ->route('voyager.database.edit', $table['name'])
               ->with($this->alertSuccess("Successfully updated {$table['name']} table"));
    }
public function update ( Request $ request ) { Voyager :: canOrFail ( 'browse_database' ) ; $ table = json_decode ( $ request -> table , true ) ; try { DatabaseUpdater :: update ( $ table ) ; // TODO: synch BREAD with Table // $this->cleanOldAndCreateNew($request->original_name, $request->name); } catch ( Exception $ e ) { return back ( ) -> with ( $ this -> alertException ( $ e ) ) -> withInput ( ) ; } return redirect ( ) -> route ( 'voyager.database.edit' , $ table [ 'name' ] ) -> with ( $ this -> alertSuccess ( "Successfully updated {$table['name']} table" ) ) ; }
Update database table.

@param \Illuminate\Http\Request $request

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