except:黑名单机制,除了show页面不需要通过中间件auth过滤,其他页面都需要
public function __construct(){
$this->middleware('auth', ['except' => 'show']);
}
only:白名单机制,只有show页面需要通过中间件auth过滤,其他页面不需要
public function __construct(){
$this->middleware('auth', ['only' => 'show']);
}