Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Laravel News:
Five Useful Laravel Blade Directives
May 23, 2018 @ 14:29:53

On the Laravel News site they've shared a list of five useful Blade directives that you may not have known about. Blade is the templating language included with the Laravel framework by default.

We’re going to look at five Laravel Blade directives you can use to simplify your templates, and learn about some convenient directives that make solving specific problems a cinch! If you’re new to the framework, these tips will help you discover the excellent features of Blade, Laravel’s templating engine.

The five on their list provide functionality to:

  1. Check if the user is authenticated
  2. Check if the user is a guest
  3. Include the first view if it exists or includes the second if it doesn’t
  4. Include a view based on a condition
  5. Include a view if it exists

Each one comes with example code showing it in use and a bit of explanation behind its use.

tagged: laravel directive blade template top5 list

Link: https://laravel-news.com/five-useful-laravel-blade-directives


Trending Topics: