xxxxxxxxxx
Route::get('/', function () {
return view('welcome');
});
xxxxxxxxxx
use App\Http\Controllers\PagesController;
// Create route for About Page
Route::get('about-us', [PagesController::class, 'aboutPage'])->name('pages.about');
xxxxxxxxxx
use Illuminate\Support\Facades\Route;
Route::get('/greeting', function () {
return 'Hello World';
});
xxxxxxxxxx
Route::get('user/profile', [UserProfileController::class, 'show'])->name('profile');
xxxxxxxxxx
//Route::currentRouteName() // check
Route::get('/users',function(){
print "Execute";
});
xxxxxxxxxx
Route::view('/welcome', 'welcome');
Route::view('/welcome', 'welcome', ['name' => 'Taylor']);