Skip to content

Latest commit

 

History

History
30 lines (23 loc) · 1.26 KB

README.md

File metadata and controls

30 lines (23 loc) · 1.26 KB

Flowder JSON Loader Latest Stable Version Build Status codecov

A JSON file loader for Flowder

Usage

  1. Install Flowder JSON Loader as a development dependency through Composer

    $ composer install imjoehaines/flowder-json-loader --dev
  2. Pass an instance of Imjoehaines\FlowderJson\JsonLoader to Flowder, as detailed in the Flowder readme

  3. 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"
    }
]