Laravel create model and database table
Goto ->database-> migrations folder.
There are files where schema(create table) methods are defined.
Open command
run command php artisan migrate
4 tables are created.
failed_jobs
migrations -> Saves all record of tables created. Prevents recreation of same tables already created
password_resets
users
Database and models are related
Table name should be plural
Model name should be singular
e.g
User model connected to Users table
Stude model connected to Students table




Comments
Post a Comment