“Laravel Routenname Blade” Code-Antworten

Laravel aktueller Routename

$route = Route::current();

$name = Route::currentRouteName();

$action = Route::currentRouteAction();
Cooperative Crab

Laravel Routenname 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
Worrisome Willet

Laravel ist Routenname

// Check if route is ***
Request::route()->named("YourRouteNameView")
gtamborero

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
Bloody Booby

Setzen Sie den Routennamen Laravel

Route::get('/novanoticia', 'HomeController@getNovaNoticia')->name('route_name');
Route::get('/novanoticia', ['as' => 'route_name', 'uses' => 'HomeController@getNovaNoticia']);
Toukir_Ahmed

Ähnliche Antworten wie “Laravel Routenname Blade”

Fragen ähnlich wie “Laravel Routenname Blade”

Weitere verwandte Antworten zu “Laravel Routenname Blade” auf PHP

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen