我是 Laravel 新手,当我在保存数据后使用 redirect()->route('route_name') 时,它不起作用。这是我的控制器功能:public function store_layouts(Request $data){ $layout = new point_prizes(); $layout->name = $data->name; $layout->points = $data->points; $layout->prize = $data->price; $layout->timestamps = false; $layout->save(); redirect()->route('view_layouts'); }这是我的路线:Route::get('/admin/layouts' , 'AdminController@view_layouts')->name('view_layouts');Route::get('/admin/layouts/make' , 'AdminController@create_layouts')->name('create_layouts');Route::post('/admin/layouts/store' , 'AdminController@store_layouts')->name('store_layouts');任何帮助将不胜感激。
- 1 回答
- 0 关注
- 75 浏览
添加回答
举报
0/150
提交
取消