Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

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 
Source by laracasts.com #
 
PREVIOUS NEXT
Tagged: #laravel #check #query #builder #empty
ADD COMMENT
Topic
Name
9+7 =