Closed Heqma closed 3 years ago
@Heqma You are missing the slug parameter for your route. It should be something like this:
{{ localized_route('blog.show', ['slug' => $blog->slug]) }}
Ok, but it doesnt translate the route and why i need put slug if it is in route?, dont close topics..
Ok, but it doesnt translate the route and why i need put slug if it is in route?, dont close topics..
Did you add it in your translation files?
resources/lang/pl/routes.php
resources/lang/en/routes.php
Yes
- default
@Heqma You only translated the blog
route. There should be another one:
'blog/wpis/{slug}' => '...',
Or you can use a friendly key:
Route::multilingual('show-blog', ...)->name('blog.show');
And then add the following in your routes.php
:
'show-blog' => 'blog/wpis/{slug}',
Oh.. i see.. that how it's works..
@Heqma Does it work for you now?
Hi, i have another Q becouse i have something like this in href "{{ localized_route('front.index') }}" with this controller "Route::multilingual('/', 'FrontController@index')->name('front.index');" and it's work..without pl.front.index but why isn't work with other routes like this?
like: Route::multilingual('/blog/wpis/{slug}', 'BlogController@show')->name('blog.show'); href ="{{ localized_route('blog.show') }}"
other problem: