Laravel x Cakephp

1

I'm starting in Laravel (5.x), but I have years experience in Cakephp and would like to solve some doubts, since I did not find something like this on the Internet:

1) I can only create models, controllers and the like by the command of Artisan? Or can I do it differently?

2) After all, what is Artisan and what is its capacity (only to create models and controllers or something else)?

3) In Cakephp I worked with Elements, that is, small snippets of code that I requested in the view to compose the layout (eg: middle, footer, sidebar, menu, breadcrumbs, etc.) default, where it contained header, head, footer and the like, and this default layout did not have to be "set" in the controllers, it already renders by default. Finally, the views contained only content / core / information. The question is:

3.1) is there Elements in Laravel? If so, how do I do it? 3.2) Is there a default layout to create the common parts and work with the views only for the core / content?

For now, that's all there is to doubt. If in Laravel this layout context does not exist, please kindly tell me what would be the best way to build a flexible Layout.

    
asked by anonymous 31.07.2016 / 02:19

1 answer

2
  • No! The artisan is just an aggregator of commands that help you in some design tasks. See more .

  • As stated in topic 1, artisan is a command aggregator. You can use it to create parts of your application and do other tasks, such as clearing the application cache, migrating to the database, and more. You can also create custom commands with it. More information about artisan .

  • Laravel does not provide natively something like the elements that exist in CakePHP, however, it comes with a template system called Blade where you can create your own" elements "and make templates very flexible.

  • As a support material (very good), you can see the Laracasts videotapes with its basics . It will clear up quite a few questions about all these issues that you raised besides teaching to make some simple applications.

        
    31.07.2016 / 02:55