How to make migration with model in laravel?

May 8, 2023
Laravel
How to make migration with model in laravel?

In this guide, you will learn how to make migration with model in laravel.

This step-by-step short guide to get the answer on how you can make migration with model in laravel.

Make migration with model in laravel

Make sure you have installed the laravel and open up the terminal to type the following command:

php artisan make:model YourModelName -m

In the above artisan command, we are making the model with the name YourModelName using make:model and -m flag is for creating the migration.

So using it, you will be able to make migration with model.

Also Read: Create model, controller and migration in single artisan command?

Conclusion

In the above guide, you have learned how to make migration with model in laravel. Let me know if you have any questions in the comments 🙂

Write a Reply or Comment

Your email address will not be published. Required fields are marked *


Icon