Answers for "variables in blade"

PHP
2

blade set variable

@php ($i = 1)
Posted by: Guest on November-30-2020
1

create variable in laravel blade

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

blade if

@if (count($records) === 1)
    I have one record!
@elseif (count($records) > 1)
    I have multiple records!
@else
    I don't have any records!
@endif
Posted by: Guest on December-19-2020

Browse Popular Code Answers by Language