dingo / dingo/api

missing errors blade when calling out of api routes

Open
#1,153 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
9.4k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

I was using in laravel 5.1 ,Here's an example for my confusing:

my .env setting:

```
API_PREFIX=api
API_VERSION=v1
```

and I was register routes like:

```
$api = app('Dingo\Api\Routing\Router');

$api->version('v1', function ($api) {

$api->get('test' ,function (){
return 'testing';
});
});
```

when i calling "example.com/test" I can see it return "testing"

but when i call out of routes like "example.com/missing-view" it will always return

`{"message":"404 Not Found","status_code":404}`

and not view errors.404.blade

how can I let it still return error view when i visit out of api routes?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.