“Laravel Rute Name Blade” Kode Jawaban

nama rute laravel saat ini

$route = Route::current();

$name = Route::currentRouteName();

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

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

Laravel adalah nama rute

// 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

Tetapkan nama rute Laravel

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

Jawaban yang mirip dengan “Laravel Rute Name Blade”

Pertanyaan yang mirip dengan “Laravel Rute Name Blade”

Lebih banyak jawaban terkait untuk “Laravel Rute Name Blade” di PHP

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya