我是 Laravel 的新手,我正在使用 Laravel 5.5。
当我提交时没有{{ csrf_field() }}
在验证 csrf 令牌中收到错误令牌不匹配异常
错误是
由于不活动,该页面已过期。请刷新并重试
我的 HTML 表单是
<form method="POST" action="/post">
<div class="form-group">
<label for="title">Title</label>
<input type="text" class="form-control" name="title">
</div>
<div class="form-group">
<label for="textblog">Body</label>
<input type="textarea" class="form-control" name="body">
</div>
<button type="submit" class="btn btn-primary">Publish</button>
</form>
我的路线网络文件
Route::post('/post','PostsController@store');
这是我的控制器类函数
public function store() {
dd(request()->all());
}