Database Configuration and Migration
1. Open xampp and start Apache, MySQL.
2. Open phpmyadmin -> localhost/phpmyadmin/ and give the database name.
After that give the same database name in env file as mention below.
3. Open env file in laravel and set database name -
4. Run the first migration. what is migration? migration is a feature which is given by laravel. You do not need to go in database. You can directly manipulate database from the laravel. You can create tables, add columns, delete columns and much more using migration in the laravel.
5. Go to database>migrations> there by default created database tables from laravel.
6. Now open new terminal in visual studio code and run this command -
When env file changes reconfigure this file again with this command.
7. Now run -
to migrate tables. Before running this command please check xampp (Apache and MySQL). After migration all the tables will be add in the database. Now go to phpmyadmin and check if tables added or not.
Comments
Post a Comment