Category: Laravel, PHP, api

Here, we’ll learn how to generate fake data with factory & seed into database. After installation of laravel & composer successfully, first set up Database configuration in .env file

This command will create a migration file in database/migrations & a factory file in database/factories Now update the people_table with below code in database/migrations

Now update PersonTableSeeder file with below code
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners