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

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