Online Snippets Library

If Statements In Laravel Blade

Here we learn how to use if else statement in laravel blade.

Example

@if ($dummy == 1)
    we have 1 record
@elseif ($dummy ==10)
    we have 10 record
@else
    No record found.
@endif