Auth 中间件 Auth 中间件Auth 中间件 必须 书写在控制器的 __construct 方法中,并且 必须 使用 except 黑名单进行过滤,这样当你新增控制器方法时,默认是安全的。 public function __construct(){ $this->middleware('auth', [ 'except' => ['show', 'index'] ]);}