laravel blade get array count in Blade

183

laravel blade get array count in Blade -

You can use the php count function to count the length of an array.

http://php.net/manual/en/function.count.php
EXAMPLE:

@if (count($array) > 0)
    {{-- expr --}}
@endif

Comments

Submit
0 Comments