uri in laravel code example

Example 1: laravel use url

use Illuminate\Support\Facades\URL;

echo URL::current();

Example 2: laravel group routes

Route::group(['prefix' => 'admin'], function () {
    Route::get('users', function ()    {
        // Matches The "/admin/users" URL
    });
});

Example 3: laravel route match

Route::match(['get', 'post'], '/', function () {
    //
});

Route::any('/', function () {
    //
});

Example 4: laravel route

Route::get('user/profile', [UserProfileController::class, 'show'])->name('profile');