Afrikaans
Akan
Albanian
Amharic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranรฎ)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
Blade comes with other useful directives for conditional rendering.
Let's try that unless directive, it will render the content only if its condition is false and it has
no alternative or else options, it has to be closed with one and unless directive so lets other condition
this can be posed is new.
So if this condition will be false, the content will be rendered so we can put something like it is
an old post using unless safety changes.
And let's head to the chrome to verify it at first.
Let's try with blog post one.
It's not rendered because this is our new blog post and here it is, unless it's working.
Next, there are the ESET and empty directives.
They work exactly the same as their counterparts functions.
But first, let's add that his comments property to one of our posts, maybe to the first one, so his
comments equals true.
So we want added to the second blog post.
Now let's go back to the template.
So below the content, let's use that is, said DirecTV.
Which adds with our counterpart and is set to verify if the variable is actually set.
So we'll check if Post has comments is set and we will render that the Post has some comments using
it said.
So let's verify that in the browser.
That's the first blog post, and you can see that the Post has some comments, text is rendered and
on the second blog post, there is no text as this property does not exist.
Now, let's glance at the blade dogs.
So you can see there's plenty more of this conditional rendering directives, most of them are combined
with Laravel features you are yet to learn about, so you will see them much later in the course.
So we want to use at all, if you are curious, go take a look at what's possible.
Finally, you might be happy to learn that you can create your own custom if statements in late and
the recent accommodation page about it.
So whenever you feel like you are ready to do it and you will find some usage for it, I invite you
to just try it out on yourself.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.