Setting Authentication Middleware for Name Group Route in Laravel 10

লারাভেলের Name Group Route -এ Authentication Middleware সেট করতে:Route::middleware([‘auth’])->name(‘user.’)->group(function () {
    Route::get(‘/u/profile’, function () {
        print “User Profile”;
    })->name(‘profile’);

    Route::get(‘/u/dashboard’, function () {
        print “User Dashboard”;
    })->name(‘dashboard’);
});

Similar Posts