Support the ongoing development of Laravel.io →
Database Eloquent
Last updated 6 months ago.
0

Why wouldn't it be in the app directory?

Last updated 6 months ago.
0

Its ok to be in app but don't u want to separate models into sub directory at least. Currently models are located in app root.

Last updated 6 months ago.
0

That's the general idea. You namespace your models. For example, you might have App\Auth\User as your user object. It works better for code organisation.

Last updated 6 months ago.
0

The organization is up to you. I like having Acme\Model but if you have many models then including sub directories that relate to their functionality is a good idea.

Last updated 6 months ago.
0

Sign in to participate in this thread!

LoadForge

Your banner here too?

loriel loriel Joined 12 Sep 2014

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.

© 2022 Laravel.io - All rights reserved.