Answers for "blade access blade variable with @php"

PHP
3

create variable in laravel blade

@php
$i = 1
@endphp
Posted by: Guest on August-06-2021
0

pass variable to blade laravel

// In the main router.
return view("profile")->with('username', "CoolGuy")

// In the blade.
<?php echo username ?>;
Posted by: Guest on February-08-2022

Browse Popular Code Answers by Language