Support the ongoing development of Laravel.io →
Architecture
Last updated 2 years ago.
0

If your helpers.php is growing a lot your application will end up with functions being called here and there. Use helpers as the last resort of quickly calling methods, such as convert database time to user time, format a name, etc.

Implementing reusable classes is more object oriented and will save your time in the long run.

you can include all files in a directory by opening the directory and including files in a loop. see example:

http://stackoverflow.com/questions/26174024/composer-autoload-multiple-files-in-folder

0

Sign in to participate in this thread!

Eventy

Your banner here too?

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.