报这个错误,请注意在laravel5.5中,不再直接报错.这是在post提交没有token造成的,我们需要在表单中添加
{{ csrf_field() }}
还可以设置忽略
<?php
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
class VerifyCsrfToken extends Middleware
{
/**
* The URIs that should be excluded from CSRF verification.
*
* @var array
*/
protected $except = [
//下面的路由将会被忽略
'config/*',
];
}