dimanche 24 janvier 2016

Laravel 5.1 custom model does not generate a table

i am Laravel beginner and i want to create a custom Model. After running artisan make command, docs say following:

Note that we did not tell Eloquent which table to use for our User model. The "snake case", plural name of the class will be used as the table name unless another name is explicitly specified.

But when and how is the table created? When i use ->save() method to store my stuff in DB, i Assumed, the table will be automatically created if Laravel cant find such table. Instead, i got Missing Table Error.

Any help appreciated. So far, i read all the docs about custom Models, but i cant get answer i need.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire