get size of laravel result eloquent code example
Example 1: check count in laravel
$wordlist = Wordlist::where('id', '<=', $correctedComparisons)->get();
$wordCount = $wordlist->count();
Example 2: laravel check if query builder is empty
@if ($query === null)
{
<h4 style="text-transform: lowercase;">no results for: #{{ $query }}</h4>
}
@else
{
<h4 style="text-transform: lowercase;">results for: #{{ $query }}</h4>
}
@endif