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.

Example

                                        

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

Suggest An Answer

No suggestions avaliable!