后台接口似乎出错了

laravel 5.5 版本, 一切功能正常, 但是后台的接口 (使用的 dingo api ) 请求时报错了, 删除这份扩展包是能正常请求的

{
    "message": "Call to a member function getName() on null",
    "status_code": 500,
    "debug": {
        "line": 559,
        "file": "\/home\/vagrant\/Code\/tomtop-db\/vendor\/pragmarx\/tracker\/src\/Data\/RepositoryManager.php",
        "class": "Symfony\\Component\\Debug\\Exception\\FatalThrowableError",
        "trace": [
            "#0 \/home\/vagrant\/Code\/tomtop-db\/vendor\/pragmarx\/tracker\/src\/Data\/RepositoryManager.php(587): PragmaRX\\Tracker\\Data\\RepositoryManager->getRouteName(Object(Illuminate\\Routing\\Router))",
            "#1 \/home\/vagrant\/Code\/tomtop-db\/vendor\/pragmarx\/tracker\/src\/Tracker.php(222): PragmaRX\\Tracker\\Data\\RepositoryManager->getRoutePathId(Object(Illuminate\\Routing\\Router), Object(Illuminate\\Http\\Request))",
            "#2 \/home\/vagrant\/Code\/tomtop-db\/vendor\/pragmarx\/tracker\/src\/Tracker.php(468): PragmaRX\\Tracker\\Tracker->getRoutePathId()",
            "#3 \/home\/vagrant\/Code\/tomtop-db\/vendor\/pragmarx\/tracker\/src\/Vendor\/Laravel\/ServiceProvider.php(389): PragmaRX\\Tracker\\Tracker->routerMatched(true)",
            "#4 \/home\/vagrant\/Code\/tomtop-db\/vendor\/laravel\/framework\/src\/Illuminate\/Events\/Dispatcher.php(350): PragmaRX\\Tracker\\Vendor\\Laravel\\ServiceProvider->PragmaRX\\Tracker\\Vendor\\Laravel\\{closure}(Object(Illuminate\\Routing\\Events\\RouteMatched))",
            "#5 \/home\/vagrant\/Code\/tomtop-db\/vendor\/laravel\/framework\/src\/Illuminate\/Events\/Dispatcher.php(200): Illuminate\\Events\\Dispatcher->Illuminate\\Events\\{closure}('Illuminate\\\\Rout...', Array)",
            "#6 \/home\/vagrant\/Code\/tomtop-db\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php(632): Illuminate\\Events\\Dispatcher->dispatch('Illuminate\\\\Rout...')",
            "#7 \/home\/vagrant\/Code\/tomtop-db\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php(601): Illuminate\\Routing\\Router->runRoute(Object(Dingo\\Api\\Http\\Request), Object(Illuminate\\Routing\\Route))",
            "#8 \/home\/vagrant\/Code\/tomtop-db\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php(590): Illuminate\\Routing\\Router->dispatchToRoute(Object(Dingo\\Api\\Http\\Request))",
            "#9 \/home\/vagrant\/Code\/tomtop-db\/vendor\/dingo\/api\/src\/Routing\/Adapter\/Laravel.php(81): Illuminate\\Routing\\Router->dispatch(Object(Dingo\\Api\\Http\\Request))",
            "#10 \/home\/vagrant\/Code\/tomtop-db\/vendor\/dingo\/api\/src\/Routing\/Router.php(512): Dingo\\Api\\Routing\\Adapter\\Laravel->dispatch(Object(Dingo\\Api\\Http\\Request), 'v1')",
            "#11 \/home\/vagrant\/Code\/tomtop-db\/vendor\/dingo\/api\/src\/Http\/Middleware\/Request.php(126): Dingo\\Api\\Routing\\Router->dispatch(Object(Dingo\\Api\\Http\\Request))",
            "#12 \/home\/vagrant\/Code\/tomtop-db\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(114): Dingo\\Api\\Http\\Middleware\\Request->Dingo\\Api\\Http\\Middleware\\{closure}(Object(Dingo\\Api\\Http\\Request))",
            "#13 \/home\/vagrant\/Code\/tomtop-db\/vendor\/barryvdh\/laravel-debugbar\/src\/Middleware\/InjectDebugbar.php(58): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Dingo\\Api\\Http\\Request))",
            "#14 \/home\/vagrant\/Code\/tomtop-db\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(149): Barryvdh\\Debugbar\\Middleware\\InjectDebugbar->handle(Object(Dingo\\Api\\Http\\Request), Object(Closure))",
            "#15 \/home\/vagrant\/Code\/tomtop-db\/vendor\/fideloper\/proxy\/src\/TrustProxies.php(56): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Dingo\\Api\\Http\\Request))",
            "#16 \/home\/vagrant\/Code\/tomtop-db\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(149): Fideloper\\Proxy\\TrustProxies->handle(Object(Dingo\\Api\\Http\\Request), Object(Closure))",
            "#17 \/home\/vagrant\/Code\/tomtop-db\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Middleware\/TransformsRequest.php(30): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Dingo\\Api\\Http\\Request))",
            "#18 \/home\/vagrant\/Code\/tomtop-db\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(149): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Dingo\\Api\\Http\\Request), Object(Closure))",
            "#19 \/home\/vagrant\/Code\/tomtop-db\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Middleware\/TransformsRequest.php(30): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Dingo\\Api\\Http\\Request))",
            "#20 \/home\/vagrant\/Code\/tomtop-db\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(149): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Dingo\\Api\\Http\\Request), Object(Closure))",
            "#21 \/home\/vagrant\/Code\/tomtop-db\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Middleware\/ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Dingo\\Api\\Http\\Request))",
            "#22 \/home\/vagrant\/Code\/tomtop-db\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(149): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle(Object(Dingo\\Api\\Http\\Request), Object(Closure))",
            "#23 \/home\/vagrant\/Code\/tomtop-db\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Middleware\/CheckForMaintenanceMode.php(46): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Dingo\\Api\\Http\\Request))",
            "#24 \/home\/vagrant\/Code\/tomtop-db\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(149): Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode->handle(Object(Dingo\\Api\\Http\\Request), Object(Closure))",
            "#25 \/home\/vagrant\/Code\/tomtop-db\/vendor\/barryvdh\/laravel-cors\/src\/HandlePreflight.php(29): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Dingo\\Api\\Http\\Request))",
            "#26 \/home\/vagrant\/Code\/tomtop-db\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(149): Barryvdh\\Cors\\HandlePreflight->handle(Object(Dingo\\Api\\Http\\Request), Object(Closure))",
            "#27 \/home\/vagrant\/Code\/tomtop-db\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(102): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Dingo\\Api\\Http\\Request))",
            "#28 \/home\/vagrant\/Code\/tomtop-db\/vendor\/dingo\/api\/src\/Http\/Middleware\/Request.php(127): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))",
            "#29 \/home\/vagrant\/Code\/tomtop-db\/vendor\/dingo\/api\/src\/Http\/Middleware\/Request.php(103): Dingo\\Api\\Http\\Middleware\\Request->sendRequestThroughRouter(Object(Dingo\\Api\\Http\\Request))",
            "#30 \/home\/vagrant\/Code\/tomtop-db\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(149): Dingo\\Api\\Http\\Middleware\\Request->handle(Object(Dingo\\Api\\Http\\Request), Object(Closure))",
            "#31 \/home\/vagrant\/Code\/tomtop-db\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))",
            "#32 \/home\/vagrant\/Code\/tomtop-db\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php(102): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))",
            "#33 \/home\/vagrant\/Code\/tomtop-db\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Kernel.php(151): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))",
            "#34 \/home\/vagrant\/Code\/tomtop-db\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Kernel.php(116): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))",
            "#35 \/home\/vagrant\/Code\/tomtop-db\/public\/index.php(55): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))",
            "#36 {main}"
        ]
    }
}

转义斜杠是 postman 版本更新后的问题

《L02 从零构建论坛系统》
以构建论坛项目 LaraBBS 为线索,展开对 Laravel 框架的全面学习。应用程序架构思路贴近 Laravel 框架的设计哲学。
《L03 构架 API 服务器》
你将学到如 RESTFul 设计风格、PostMan 的使用、OAuth 流程,JWT 概念及使用 和 API 开发相关的进阶知识。
讨论数量: 3

似乎是开启了路由报错的

'log_routes' => false,
7个月前 评论

逻辑是靠中间件完成的,应该设置在 web 组中,这样 api 就不会记录。配合dingo貌似是有些问题

7个月前 评论

@liyu001989 我是设置在 web 组中的, 而且我还在 config/tracker 里设置 do_not_track_routes, do_not_track_paths 都加上了 admin 相关的忽略路径, 依然是有问题的,

7个月前 评论

请勿发布不友善或者负能量的内容。与人为善,比聪明更重要!