Support the ongoing development of →
Packages Architecture
Last updated 2 years ago.

Feel free to put your code wherever you want. Maybe there are some tips for doing it in a diferent way, but mostly the directory tree should be a personal choise and you can put your classes where you feel makes most sense for you. Also you're right with PSR-4, if you make app\MyClasses\Points.php then you could use your code something like new App\MyClasses\Points and will work. Remember to use composer dumpautoload before that.

Personally I sometimes use app\Classes, app\Classes\Interfaces, app\Classes\Abstracts for most basics projects.

Also, you could make a composer package and then a service provider and then a facade and share it with your friends or the comunity.


Thanks. Just wanted to check. I can create my own folders then.

By the way if follow PSR-4 rules, no need to autodump any more ;)


Sign in to participate in this thread!


Your banner here too?

martynbiz martynbiz Joined 15 Feb 2015


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

Your logo here?

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

© 2024 - All rights reserved.