【发布时间】:2018-01-02 09:21:38
【问题描述】:
所以我有这个后退按钮,我在创建建筑物时使用它,然后主页有一个后退按钮,用于编辑及其工作。
问题是我有一个OfficePage,它也有创建和编辑,每次我点击创建办公室时,办公室页面的后退按钮都不起作用查看我创建的办公室,这里有我的路线和代码。
这是构建的后退按钮代码
<a href="{{route('index')}}" class="btn btn-default btn-md"> GO Back</a>
这是office的后退按钮代码
<a href="javascript:history.back()" class="btn btn-default">Back</a>
路线
Route::get('/home', 'HomeController@index')->name('home');
Route::get('/', 'BuildingController@index')->name('index');
Route::get('building/{id}', 'PageController@show');
Route::get('buildings/create', 'BuildingController@create')->name('createbform')
Route::post('building/create/store', 'BuildingController@store')->name('createbuilding');
Route::get('building/{id}/edit', 'BuildingController@edit');
Route::post('building/{id}/edit', 'BuildingController@update')->name('editbuilding');
Route::get('building/{id}/delete', 'BuildingController@destroy');
Route::get('office/{id}', 'OfficeController@show')->name('officeMenu');
Route::get('building/{id}/offices/create', 'OfficeController@create')->name('createofficeform');
Route::post('building/{id}/offices/create/store', 'OfficeController@store')->name('createoffice');
Route::get('building/{id}/offices/edit', 'OfficeController@edit')->name('editofficeform');
Route::post('building/{id}/offices/edit', 'OfficeController@update')->name('editoffice');
Route::get('offices/{id}/delete', 'OfficeController@destroy')->name('deleteoffice');
【问题讨论】: