@if (count($records) === 1)
I have one record!
@elseif (count($records) > 1)
I have multiple records!
@else
I don't have any records!
@endif
Kolaylık sağlamak için Blade ayrıca bir @unless yönergesi sağlar:
@unless (Auth::check())
You are not signed in.
@endunless
@isset ve @empty yönergeleri, ilgili PHP işlevleri için uygun kısayollar olarak kullanılabilir:
@isset($records)
// $records is defined and is not null...
@endisset
@empty($records)
// $records is "empty"...
@endempty
Kimlik Doğrulama Yönergeleri
@auth
// The user is authenticated...
@endauth
@guest
// The user is not authenticated...
@endguest
Daha belirgin ve net kimlik doğrulamaya göre yönlendirme yapılabilir.
@auth('admin')
// The user is authenticated...
@endauth
@guest('admin')
// The user is not authenticated...
@endguest