What is Database Migration and how to use this in Laravel?
Database migration is like the version control of the database, which allows the team to modify and share the database schema of the application. Database migrations are paired with the schema builder of Laravel which is used to build the database schema of the application.
It 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.
You 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