0

I am new laravel programmer, and I have simple question about setting up database.

Assume that I create all required migrations, models, and eloquent relationships, also configure mysql database in laravel, now in this point, is laravel will create all mysql tables required in server's DB according to migrations, models, and eloquent that I created before? In other words, do I need to create tables in mysql server as scratch developer do?

1
  • When you run php artisan migrate the databases will be created and populated with any data you have specified See Commented Aug 27, 2016 at 16:48

2 Answers 2

1

To create a migration, use the make:migration Artisan command:

php artisan make:migration create_users_table

To run all of your outstanding migrations, execute the migrate Artisan command:

php artisan migrate
Sign up to request clarification or add additional context in comments.

Comments

1

Laravel have many commands from console.

from console,go to your project folder path run php artisan list to see all avaliable commands.

your question asked how to create tables after you created migrations, which is php artisan migrate.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.