Search
 
SCRIPT & CODE EXAMPLE
 

PHP

laravel get current route name

Route::currentRouteName()
Comment

laravel get current route name

request()->route()->getName()
Comment

laravel get current route name

Route::getCurrentRoute()->getActionName();
Comment

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
Comment

laravel is route name

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

check the route type in laravel

if($request->isMethod('post')){
 //
}
Comment

naming the routes in laravel

Route::get('/', [ControllerName::class, 'index'])->name('homeRoute');
Comment

set route name laravel

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

laravel route name routes

Route::get('user/profile', function () {
    //
})->name('profile');
Comment

laravel get route

Route::get('foo', function () {
    return 'Hello World';
});
Comment

laravel get route

Route::get('/user', 'UserController@index');
Comment

set route name laravel

Route::get('/novanoticia', 'HomeController@getNovaNoticia')->name('route_name');
Comment

what is route namespace in laravel

Route::namespace('Admin')->group(function () {
    // Controllers Within The "AppHttpControllersAdmin" Namespace
});
Comment

laravel route name with parameters

Route::get('/user/{id}/profile', function ($id) {
    //
})->name('profile');

$url = route('profile', ['id' => 1]);
Comment

PREVIOUS NEXT
Code Example
Php :: time left laravel seconds 
Php :: wordpress add new page programmatically 
Php :: how to remove annoying plugin notification in wordpress 
Php :: php week of a date 
Php :: can I change my ip adress with python 
Php :: display image from database in laravel 
Php :: php html to text 
Php :: laravel db inserr 
Php :: php split large text on line breaks into array 
Php :: laravel 5 use env variable in blade 
Php :: base url dinamis codeigniter 
Php :: wp_query post by category taxonomy 
Php :: csv utf-8 excel into php 
Php :: php count vs sizeof 
Php :: call to a member function setcookie() on null laravel middleware 
Php :: SPA and keep some of the Laravel pages you need to have a route like this 
Php :: php tomorrow 
Php :: php ical 
Php :: str_shuffle in php 
Php :: Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1 
Php :: php http authentication 
Php :: in_array associative array php 
Php :: laravel append parameter to links 
Php :: file upload codeigniter 
Php :: how to add page link in laravel 
Php :: php filter array 
Php :: laravel merge two query builder 
Php :: spatie laravel activity log 
Php :: php mysql insert timestamp now 
Php :: php write to standard out 
ADD CONTENT
Topic
Content
Source link
Name
1+3 =