<?php
Route::get('/', function () {
return view('welcome', ['name' => 'Samantha']);
});
?>
// In Blade
<?php
{{ $name }}
?>
// In the main router.
return view("profile")->with('username', "CoolGuy")
// In the blade.
<?php echo username ?>;
<?php
Route::get('/', function () {
return view('welcome', ['name' => 'Samantha']);
});
?>
// In Blade
<?php
{{ $name }}
?>
// In the main router.
return view("profile")->with('username', "CoolGuy")
// In the blade.
<?php echo username ?>;