Generating fake data manually for each model seed is cumbersome. Instead, you can use  model factories to generate large amounts of database records conveniently. Laravel has a feature called model factories that allow us to generate fake data. It is beneficial for testing and seeding fake data into the database to see the code in action before any real-time user data comes into your application. Let’s deep dive into the Model Factories in Laravel.

Laravel 7/6 Model Factories

Faker is the PHP library that generates fake data for you. Whether you need to bootstrap your database, fill-in your persistence to stress test it or anonymize data taken from the production service, Faker is for you. You can find the faker documentation  here.

#laravel 7/6 #laravel #bootstrap #php

Laravel 7/6 Model Factories Example | Laravel 7/6 Seeding
11.25 GEEK