InterviewSolution
Saved Bookmarks
| 1. |
What is database migration used in Laravel 5? Explain |
|
Answer» In Laravel, Migration is a type of version control for our database. It is allowing US to modify and share the application's database schema easily. A migration file contains two methods up() and down(). up() is USED to add NEW tables, columns, or INDEXES database and the down() is used to reverse the operations performed by the up method. ExampleYou can generate a migration & its file with the HELP of make:migration . Syntax : php artisan make:migration blog A current_date_blog.php file will be create in database/migrations |
|