imjoehaines/flowder-json-loader

A JSON file loader for flowder

dev-master 2018-02-14 11:45 UTC

This package is auto-updated.

Last update: 2024-10-29 04:53:13 UTC


README

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