A Good Structure
Lumen comes with a good structure. As it is derived from Laravel, which follows the MVC (Model View Controller) pattern, Lumen also has a Model and Controller layer. It does not have the view layer, because it does not need views: it is for web services. If you don't know what MCV is, consider it just an architectural pattern where responsibilities are distributed in three layers. Model is a DB layer and sometimes also used as business logic layer (we will look into what should be in the model in a later chapter). The view layer is for template related stuff. Controller can be considered a layer handling requests while getting data from Model and rendering View. In case of Lumen, there are only Model and Controller layers. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access