1.配置未找到404錯誤
App\Exceptions\Handler render 方法里加入
if (!($exception instanceof AuthenticationException)) {
return response()->json([
'errorinfo' => ['c_err'=>'Resource not found.','err_data'=>123,'err_code' => 404]
],404);
}