chinleung / laravel-multilingual-routes

A package to handle multilingual routes in your Laravel application.
https://github.com/chinleung/laravel-multilingual-routes-demo
MIT License
394 stars 26 forks source link

Add `hasLocalized` router macro #77

Closed fyrts closed 6 months ago

fyrts commented 6 months ago

I've added a Route::hasLocalized method, analogous to Laravel's Route::has method for checking if a named route exists:

@if (Route::hasLocalized('login'))
    <a href="{{ localized_route('login') }}">{{ __('auth.login') }}</a>
@endif 
chinleung commented 6 months ago

Looks good, thanks @fyrts!