Answers for "laravel blade routeIs"

PHP
0

laravel route name blade

How to use routes in web.php :
  Route::get('/', function () { return view('home'); })->name('home');


How to use routes in your page.blade.php :
  <a href="{{ url("/") }}">home</a>
  // or
  <a href="{{ route('home') }}">home</a>

// Like the post if you found it usefull and help other devs to find the good answer
Posted by: Guest on March-09-2022
0

laravel blade routeIs

// This has been the best way for me to test routes with parameters

@if(url()->current() == route('named-route', 'parameter')
	// do stuff
@endif
Posted by: Guest on April-29-2022

Browse Popular Code Answers by Language