Laravel Seed From JSON

Laravel Seed From JSON is a small trait that lets a seeder read its records from JSON files. Seed content lives next to the seeder as data rather than as a growing array literal inside the class.

Add the SeedFromJson trait to a seeder, point it at a file, and iterate the result like any other collection of rows. This site uses it for every section it seeds — blog posts, documents, projects and the very list of packages you are reading.

Installation
composer require sergeybruhin/seed-from-json