api: Regular Laravel routes returns 404 after update

I’ve updated Dingo to the latest version using "dingo/api": "1.0.*@dev", but now all my regular Laravel routes outside the Dingo router won’t seem to match any requests. Even a simple route isn’t recognized as a valid request:

Route::get('test', function() {
    die('test');
});

Can u look at this problem?

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 16 (6 by maintainers)

Most upvoted comments

I’m having the same issue,after update appear this question

{"message":"404 Not Found","status_code":404,"debug":{"line":161,"file":"\/www\/personalpushcenter\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/RouteCollection.php","class":"Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException","trace":["#0 \/www\/personalpushcenter\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php(750): Illuminate\\Routing\\RouteCollection->match(Object(Dingo\\Api\\Http\\Request))",

The problem is API_DOMAIN in .env or config/api.php file. i modified the value of API_DOMAIN to empty ,and solve the problem. which is like:

API_STANDARDS_TREE=vnd
API_SUBTYPE=myapp
API_VERSION=v1
API_PREFIX=api
API_DOMAIN=
API_NAME=My API
API_CONDITIONAL_REQUEST=false
API_STRICT=false
API_DEBUG=true
API_DEFAULT_FORMAT = json
API_TRANSFORMER = Dingo\Api\Transformer\Adapter\Fractal

Confirmed. If using /api/ for API_PREFIX it will break. When using api as API_PREFIX it works. May be need to highlight somewhere? Some sample documentation on the net still using /api/ as the prefix.