Answers for "laravel default route"

PHP
5

Creating a Basic Route in Laravel 8

use App\Http\Controllers\PagesController;

// Create route for About Page
Route::get('about-us', [PagesController::class, 'aboutPage'])->name('pages.about');
Posted by: Guest on July-03-2021
0

laravel route Accessing The Current Route

$route = Route::current();

$name = Route::currentRouteName();

$action = Route::currentRouteAction();
Posted by: Guest on July-24-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
2

laravel route pattern

Route::pattern('id', '[0-9]+');
Route::get('user/{id}', function ($id) {
    // Only executed if {id} is numeric...
});
Posted by: Guest on May-18-2020
-1

set route name laravel

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

how to create route in laravel

Route::match(['get', 'post'], '/', function () {
    //
});
Posted by: Guest on May-13-2021

Browse Popular Code Answers by Language