Support the ongoing development of Laravel.io →
posted 9 years ago
Architecture
Last updated 1 year ago.
0

Hi Isomis,

Welcome to the laravel community

for question one 1 laravel does not tell you to use any type of file structure its up to the developer the orginal app is just to provide people new to laravel a starting point but if you want you can split it up into usercases/domain objects a good example is the laravelio repo where you can find a copy of this site

Not sure what you mean with a BlogManager/BlogService you can load Repos or any classes the same way you would usualy do
as laravel uses composer and teh auto load function that comes with it

Hope this helps

Regards

Timothy

Last updated 1 year ago.
0

I want to use a Manager/Service for functions like:

getForm() getImageByPosition()

In my opinion this functions are not on the right place in a controller, model or repo. This service/manager layer is the communication between the controller and the models with there repo's.

Last updated 1 year ago.
0

Laravel does not force to organize a structure of directory. You can put all anywhere you want to put in . Just, you should use a autoload using a composer.

For instance, when you create a user service, you can put it in app/Services/UserService Directory then You should describe UserService to autoload it in composer.json.

This links will save you.

Thank you.

Last updated 1 year ago.
0

Hey isomis, I came from Symfony as well and found comfort in the structure I wrote about here: http://dfg.gd/blog/decoupling-your-code-in-laravel-using-repos...

In Laravel you have a lot of freedom and can adapt it to work how you like, there are no right answers, so play around!

Last updated 1 year ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

isomis isomis Joined 7 Jul 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.