I have Dingo API.
This is my routes.php file:
Route::resource('test','TestController');
$api = app('api.router');
$api->version('v1',['prefix' => 'api'], function ($api) {
$api->resource('user', 'App\Http\Controllers\API\v1\UserController');
});
In UserController I can only use API routes??
So I cannot do route('test.index') as it gives me this error: Route [test.index] not defined
but route('api.user.index') works fine?
How can I use native Laravel routes like test.index, test.edit etc?
I see route() calling app() function, but I don't get how it works. Is this documented anywhere?
I figured it out... The issue was discussed here: https://github.com/dingo/api/issues/918
A pull request was submitted by jenky https://github.com/dingo/api/pull/919
I simply ran "composer update" to get latest dev version of Dingo API and the issue was solved.