Blog-details
  • Nov 22, 2023
  • Admin
  • 0 Comments
  • -

Create a Blog with Laravel Migrations, Model Factories and Seeding

Create A Blog With Laravel Migrations, Model Factories And Seeding

When I was first introduced to Laravel, less then 2 years ago, I was immediately taken by it. The rich echo system, the fast-paced updates, a huge community of developers and the relative ease with which you can get a project up and running. However, there were some DB features like Migrations and Seeding I never fully explored. When I started incorporating migrations and seeding into my project, my development process become more productive and efficient.

In this tutorial, we will create a simple blog with migrations, model factories and DB seeding. There is a lot to cover here and I cannot dive deeply into every subject. Laravel is a feature rich framework – and very well documented! So, for each subject I’ll be writing about, there is a lot more to cover (seriously, a lot!). I’ve included links to relevant sections of Laravel’s official docs in every part of this tutorial. This tutorial uses Laravel 8.x.

We will:

   - Setup a Laravel project

   - Connect to a DB

   - Create models

   - Create migrations

   - Create factories

   - Seed DB

Here is the GitHub repository for this tutorial:

👉 https://github.com/yossi-abramov/laravel-blog-migration-factory-seed