MasoniteFramework / masonite4

Temporary Repository for a Masonite Rewrite for Masonite 4
14 stars 3 forks source link

Models locations should not be "hard-coded" #212

Closed girardinsamuel closed 2 years ago

girardinsamuel commented 2 years ago

For now it's assumed in some places that models are located in "app/models". In some places we can edit the model path such as in the tinker command where with the -d flag we can change the directory from which models are loaded.

It's fine, but it would be better to have a configurable location as for other features of the framework. We could register something like this in the kernel:

self.application.bind("models.location", "app/models")

and be able to edit it later.