【发布时间】:2021-06-10 23:15:11
【问题描述】:
所以这是我第一次发布问题,我希望我能得到一些帮助。 这是我的 web.php 文件代码:
Route::get('/blogs', 'BlogsController@index')->name('blogs');
Route::get('/blogs/create', 'BlogsController@create')->name('create');
Route::post('/blogs/store', 'BlogsController@store')->name('blogs.store');
这个是html中的表单域:
<form action="{{ route('blogs.store') }}" method="post">
@csrf
</form>
【问题讨论】:
-
你是在表单动作属性中直接使用 blogs.store 吗?
-
是的,我尝试使用我为路线指定的名称,也尝试使用 uri。似乎没有任何效果。
-
如果您使用的是刀片模板,那么您可以按照我发布的答案进行操作