Tell me what is database migration? And how to use it to add insert initial data to database?



Tell me what is database migration? And how to use it to add insert initial data to database?..

Answer / Pratibha Pal

Database migrations are a feature in Laravel that allows you to create, modify, and rollback your database schema. To use migrations for adding initial data to the database, you can define a new migration, add a new column or table, and seed the database with initial data using the php artisan make:migration command, the php artisan migrate command, and the php artisan db:seed command respectively.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Laravel PHP Framework Interview Questions

Explain binding a singleton?

1 Answers  


How do laravel facades work?

1 Answers  


What is an observer?

1 Answers  


What is acl in laravel?

1 Answers  


How to install laravel via laravel installer.

1 Answers  


Explain how to retrive all requested data in laravel?

1 Answers  


Tell me what is database migration? And how to use it to add insert initial data to database?

1 Answers  


What do you mean by tagging used in laravel 5?

1 Answers  


How will you create a helper file in laravel?

1 Answers  


Tell me what is service providers?

1 Answers  


How to register a service provider via composer in laravel?

1 Answers  


How many types of middleware are there in laravel?

1 Answers  


Categories