Support the ongoing development of →
Last updated 1 year ago.

I have the same question. In Taylor's book, he does this in his example of getting rid of the Models folder:

"autoload": { "psr-0": { "QuickBill": "app/" } }

Excerpt From: Taylor Otwell. “Laravel: From Apprentice To Artisan.” iBooks.

Last updated 1 year ago.

With PSR-0/PSR-4, you don't have to dump-autoload when you add or update a class. With @dwenaus's example, you could put helper.php at app/helper.php with namespace QuickBill, or maybe app/helpers/helper.php with namespace QuickBill\Helpers, and you wouldn't have to dump-autoload changes to helper.php.

I only use classmap for non-namespaced classes which don't fit my normal PSR-4 rules. Specifically, app/database/migrations (see this comment), app/database/seeds/DatabaseSeeder.php and app/test/TestCase.php.

Last updated 1 year ago.

Sign in to participate in this thread!


Your banner here too?


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.

© 2023 - All rights reserved.