Source: zubairidrisaweda.medium.com

Faking It Till You Make It

Category: Laravel, MySQL, api

In this article, you would learn: It is assumed that you know basic PHP if you are reading this. Most times when we have to develop applications with dummy data, we type them in ourselves or use Postman to POST to our database.

Laravel gives you database seeders which are ways to get data in your application easily.

Running this command creates a new file in our seeders folder in the database folder.

It is in this file that we define the structure of the data to be created - we set what fields we want.
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