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

        try {
            SchemaManager::dropTable($table);
            event(new TableDeleted($table));

            return redirect()
                ->route('voyager.database.index')
                ->with($this->alertSuccess(__('voyager::database.success_delete_table', ['table' => $table])));
        } catch (Exception $e) {
            return back()->with($this->alertException($e));
        }
    }
public function destroy($table)
    {
        $this->authorize('browse_database');

        try {
            SchemaManager::dropTable($table);
            event(new TableDeleted($table));

            return redirect()
                ->route('voyager.database.index')
                ->with($this->alertSuccess(__('voyager::database.success_delete_table', ['table' => $table])));
        } catch (Exception $e) {
            return back()->with($this->alertException($e));
        }
    }
public function destroy ( $ table ) { $ this -> authorize ( 'browse_database' ) ; try { SchemaManager :: dropTable ( $ table ) ; event ( new TableDeleted ( $ table ) ) ; return redirect ( ) -> route ( 'voyager.database.index' ) -> with ( $ this -> alertSuccess ( __ ( 'voyager::database.success_delete_table' , [ 'table' => $ table ] ) ) ) ; } catch ( Exception $ e ) { return back ( ) -> with ( $ this -> alertException ( $ e ) ) ; } }
Destroy table.

@param string $table

@return \Illuminate\Http\RedirectResponse
Destroy table .