Doing Best Practices in Laravel

In this article, we will see examples of various previously-described design patterns used in Laravel.

The topics that will be discussed in this chapter are as follows:

  • Basic and advanced practices
  • Real-life examples of design patterns used in Laravel
  • The reasons why these design patterns are used in the examples

Basic practices

As a developer, when you are working on an application, there should be a systematic order to things to prevent confusion and allow flexibility. For example, in an MVC architecture, Controller should only hold the logic and Model should only hold dataflow-related stuff. You should not write database queries in View files. This way, anyone working on the project can find what they are looking for easily and can change, fork, or improve it with greater ease. If this is not followed, the project will turn into a mess as it gets bigger and bigger.

 

Recommended :  Create a browsable horses profiles with laravel 5.1

About the author

Deven Rathore

I'm Deven Rathore, a multidisciplinary & self-taught designer with 3 years of experience. I'm passionate about technology, music, coffee, traveling and everything visually stimulating. Constantly learning and experiencing new things.

Pin It on Pinterest

Shares