api: Cannot link to laravel's routes
I have a normal route like this:
Route::get('browse', [
'as' => 'browse',
'uses' => 'HomeController@browse',
]);
Normally I can generate url by using route('browse') or action('HomeController@browse') but now it doesn’t work with API’s routes.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 23 (9 by maintainers)
Commits related to this issue
- Further work on refining the Laravel adapter to use its own router instance. Because the Laravel adapter calls the Router::setRoutes method the routes container binding is set again causing the rebin... — committed to dingo/api by jasonlewis 8 years ago
- Update UrlGenerator to fully extend Illuminates UrlGenerator. References #918. Closes #919 — committed to dingo/api by deleted user 8 years ago
@amirhabibzadeh
API_DOMAINshould ONLY be used when you’re using Laravel and have a virtual host configured for the sub-domain, for example,api.yourapp.com.If you’re using
API_DOMAINthenAPI_PREFIXshould benull.If you’re API is served from
yourapp.com/apithen you’ll want to be usingAPI_PREFIX.You should not be setting a prefix and a domain. One or the other.
@jasonlewis Great it’s working now i have already tried to remove the prefix but didn’t work then i return the prefix and remove the domain it’s working fine now
i think the problem was from the domain
API_DOMAIN