Support the ongoing development of Laravel.io →
Blade Laravel
Last updated 2 years ago.
0

So I found the solution, what you need to route the link. so like this:

<a href="{{ route('contact', app()->getLocale()) }}">{{__('common.contact_us')}}</a>

and to work this you have to add the name to the Route in web.php like this:

Route::get('/contact', 'ContactController@index')->name('contact');

if you do not add the name, it will say Route not found.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.