Answer the question
In order to leave comments, you need to log in
How to generate URL in laravel using Laravel Localization?
The problem is that I use Laravel Localization and the urls are generated site.com/en/route
The problem is that when I try to call the route('news.index') construct, I get a message that the 'news' constant is not setRoute::resource('news', 'NewsController' );
route('news.index' );
Answer the question
In order to leave comments, you need to log in
Are you sure you gave the route the correct name?
Route::get('/route', ['as' => 'news.index', 'uses' => '[email protected]', 'middleware' => ['web']]);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question