X
X
xaam2018-01-17 09:03:37
Design patterns
xaam, 2018-01-17 09:03:37

How to split a Laravel application into independent parts?

how to break the process of developing an application on a lara into parts?
For example, I decided to write, say, a simple chat.
Made the necessary controller, model, migrations, displays.
Everything in elementary form works.
Now I decided to add functionality, users can now write to each other in a personal message.
here you can write everything in what is there.
But I decide to allow the payment to be screwed up, and then something else. how to not get confused in all this later?
Read/looked about containers, providers, facades. But there is no complete picture.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Anton Mashletov, 2018-01-17
@xaam

Group controllers, models, views, services into subdirectories.

M
Maxim Fedorov, 2018-01-17
@Maksclub

How to navigate the modular structure and areas of responsibility in Laravel.
And then be happy =)
5a5ee939b306c856267887.jpeg

E
Eugene Wolf, 2018-01-17
@Wolfnsex

The application space is its code itself, i.e. primarily. In other words, "general" functionality is usually not shoved into the application space. If you are creating some kind of shared module, it makes sense to put it in a package so that it can be used later in the future.
The second option - there are a lot of different extensions for Lara, which allow you to divide the application into independent parts. In particular, I came across packages that allow you to work in the lara using mechanisms similar to Symfony (Bundle), or, for example, this option .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question