jeudi 23 février 2017

laravel theme engine similar to how drupal handle block regions

I have used drupal for many years to develop custom web applications. Just switch to Laravel recently and a bit confused with the Laravel concepts.

I am happy with how drupal handle block regions for sidebar, header, footer, breadcrumbs and blocks visibility.

I would like to create a simple block/template engine which allows me to handle those blocks. Example I have created a menu block (using blade components) and I currently include in resources/layouts/app.blade.php

So this menu block will appear on every page which extends the template from app.blade.php. In order to remove the menu block from login and register page, so I write a simple if else conditions to match the url in layouts/app.blade.php

I am thinking if there is a template class which allows me to set these logics instead of putting all in if else conditions.

Or I should put these logics in Laravel service container/ service provider using the contextual binding feature?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2kRwSOV
via IFTTT

Aucun commentaire:

Enregistrer un commentaire