A JSON file loader for Flowder
-
Install Flowder JSON Loader as a development dependency through Composer
$ composer install imjoehaines/flowder-json-loader --dev
-
Pass an instance of
Imjoehaines\FlowderJson\JsonLoader
to Flowder, as detailed in the Flowder readme -
Pass the path to a JSON file to
Flowder::loadFixtures
, your JSON file should contain an array of objects where each object represents a database row. For example
[
{
"column_1": "value 1",
"column_2": 2,
"column_3": "three"
},
{
"column_1": "value 4",
"column_2": 5,
"column_3": "six"
}
]