app/models is gone. Laravel 5 came out at the start of the month, and of everything in the release the folder I notice most is the one that no longer exists.

The old skeleton had app/models and app/controllers. You knew where things go because the framework told you. Laravel 5 removes that. There is app/, it maps to the App namespace through PSR-4, and inside it you organize classes however you want.

Coming from Kohana this is a bigger shift than it sounds. In Kohana the class name dictates the file path. Model_Post lives in classes/Model/Post.php and that is that. Laravel 5 says: the namespace is the contract, the layout is your decision.

Which means teams now have to decide. And folder discussions eat weeks.

My take. Sorting classes by type, a folder for models, a folder for services, a folder for repositories, is fine for a small application. It answers “what is this class”. It does not answer “what is this application about”. When the project grows, sorting by feature works better: App\Billing, App\Catalog, and inside each one the models and services that belong to it. Open the folder, see the domain.

Honestly, either works. What does not work is arguing about it for days. Pick one scheme, write it in the readme, follow it. The autoloader does not care. The container does not care. Only people care, and people mostly want the debate to be over.

PSR-4 in the default skeleton also means one more framework quietly on the shared standard. Five years ago every framework had its own autoloading religion. Good riddance.

We spent two days on our layout. I argued for by-feature, lost, and the by-type layout has been fine since. The debate was the only expensive part.