@php
$i = 1
@endphp
@php ($i = 1)
<?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 ?>;