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

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners