Category: Laravel, PHP

Sometime when creating a new table, we need some amounts of data to test our database and UI in local development. We can define our factories and generate data with a liberally called fzaninotto/faker

Now we can run migrate to create our table.

We will create 200 of fake records in the Bookings table in our database after run seeder command.

Now we can use the Artisan command to run db:seed and seed the data to our database.
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