Skip to content

Non-api route problem #911

@achegedus

Description

@achegedus

I'm very new to Dingo, and I'm having what is probably a simple problem. I'm trying to have laravel return a route that is not in the api. My routes look like this:

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

Route::get('/', function () {
    return view('welcome');
});

$api->version('v1', function ($api) {
    $api->get('reports/', 'App\Api\Controllers\reports@index');
    $api->get('report/{id}', 'App\Api\Controllers\reports@show');
});

When I go to http://locahost:8000/api/reports, i get the correct api response. When I go to http://localhost:8000/, though, i get this:

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

Any idea what i'm doing wrong?

Any help would be fantastic.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions