How can I know the size of an array in Blade template?
You can use the PHP count function to count the length of an array.
It is possible with the count
function, like so:
@if (count($array) > 0)
{{-- expr --}}
@endif
You can use the PHP count function to count the length of an array.
It is possible with the count
function, like so:
@if (count($array) > 0)
{{-- expr --}}
@endif