What convention do you use to organize Laravel Views?

2

I would like to know how best to organize Views in Laravel, in which directory it is best to leave the includes, templates and main views.

Also what is better to put in the (navbar? layouts? sidebar?) what I can put as a template? I'm learning Laravel and so far I've only used templates to make the default HTML structure, nothing more.

    
asked by anonymous 14.05.2018 / 20:49

1 answer

0

When you install Laravel, it already comes with pre-configured folders. In this case, the layouts, views ..

In general, in layouts it is customary to leave everything that you have of default in the pages, for example the navbar.

In the view organization, it follows the MVC standard, in case if you have a user CRUD, you have at least three views, list, create, and edit. Then for each controller a folder is created with the screens used by the controller.

Folder Map:

-views
   -usuarios
      -list.blade.php
      -edit.blade.php
   -categorias
      -list.blade.php
      -edit.blade.php
      -create.blade.php
    
14.05.2018 / 21:58