$test = "foo";
I tried:
{{ $test="foo" }}
But I get foo displayed, I just need to assign the variable within a loop
There is the php directive @.php where you can write simple php, the {} are to 'print' text.
@php $test = 'foo'; @endphp https://laravel.com/docs/9.x/blade#raw-php
Обсуждают сегодня