What is Routing?
Routing maps a URL to the code that should run. In Laravel, routes are usually defined in
routes/web.php for website pages.
Basic Route Example
Route::get('/learn', function () {
return view('pages.learn.index');
});
Named Routes
Named routes make links easier to manage across your app.
Route::get('/learn', [PageController::class, 'learnIndex'])
->name('learn.index');