\App::error 怎么理解这个?
public function register()
{
if (app()->isLocal()) {
$this->app->register(\VIACreative\SudoSu\ServiceProvider::class);
}
\API::error(function (\Illuminate\Database\Eloquent\ModelNotFoundException $exception) {
abort(404);
});
}
关于 LearnKu
\Dingo\Api\Facade\API::error(这个映射关系是在vendor/dingo/api/composer.json中定义的)api.exception是两个异常处理类的别名,如下