In this article i am going to define at five Laravel Blade directives you can use to simplify your templates, and learn about some convenient directives that make solving specific problems on each.
- Check if the user is authenticated
// The user is authenticated.
- Check if the user is a guest
// The user is not authenticated.
- Include the first view if it exists or includes the second if it doesn’t
- Include a view based on a condition
- Include a view if it exists
If you going to use simple way-