Answers for "count blade laravel"

PHP
7

count in laravel'

$count = ModelName::where('id',$id)->count();
Posted by: Guest on March-18-2021
0

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
Posted by: Guest on January-07-2022

Browse Popular Code Answers by Language