I can’t find the model generated by Artisan

Asked

Viewed 139 times

0

I used the command php artisan make:model Exemplo and I couldn’t find where he saved this generated model so I could change it. I looked in the app/html folder and found nothing.

My db is ready, so I don’t need to use migrate, but I need the template to use the query.

  • look inside the folder app!

2 answers

3


The Laravel by default saves the models created through the Artisan in the directory app/, Probably be there, it would not make sense even to be in the directory that you are looking for, because a Model has no relation with files HTML.

  • Look, I even agree in parts on your answer, but if I want to put the creation inside the folder app/html I can, nothing prevents and would not be wrong, maybe a better location would be app/Models, having correlation by name and a namespace App/Models would have a better standard. Congratulations on the answer

  • Of course you can put it anywhere you want. But in my opinion it wouldn’t make much sense. I’m also in favor of creating an app/models structure like you mentioned.

  • Okay, it was just an observation.

0

how do I change the way to create in App/Models I already changed in Composer and auth I use authentication; the more in Artisan make:model keeps creating in the app

Browser other questions tagged

You are not signed in. Login or sign up in order to post.