Answers for "get route in laravel"

PHP
1

get current route laravel

get URL:
{{ Request::url() }} // http://localhost/path

get path:
{{ Request::path() }} // path
Posted by: Guest on August-23-2021
2

laravel is route name

// Check if route is ***
Request::route()->named("YourRouteNameView")
Posted by: Guest on January-15-2021
5

route() and with() in laravel

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

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

// /user/1/profile?photos=yes
Posted by: Guest on May-30-2020
4

laravel get route

Route::get('foo', function () {
    return 'Hello World';
});
Posted by: Guest on March-10-2020
1

artisan in route in laravel

Artisan::call('cache:clear')
Posted by: Guest on May-11-2021
1

set route name laravel

Route::get('/novanoticia', 'HomeController@getNovaNoticia')->name('route_name');
Route::get('/novanoticia', ['as' => 'route_name', 'uses' => 'HomeController@getNovaNoticia']);
Posted by: Guest on October-06-2020

Browse Popular Code Answers by Language