Support the ongoing development of Laravel.io →
Configuration
Last updated 1 year ago.
0

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.
0

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.
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.