Fake data
This plugin is a WIP version, and is not really ready to use yet., (*1)
Create elements with fake data, swiftly., (*2)
, (*3)
This plugin requires Craft CMS 3.0.0-beta.23 or later., (*4)
To install the plugin, follow these instructions., (*5)
Open your terminal and go to your Craft project:, (*6)
cd /path/to/project
Then tell Composer to load the plugin:, (*7)
composer require superbig/craft3-faker
In the Control Panel, go to Settings → Plugins and click the “Install” button for Faker., (*8)
-Insert text here-, (*9)
Add jobs in the config file., (*10)
Typehint the element type and the Faker Generator (autoinjected) to autocomplete method in IDEs like PHPStorm., (*11)
<?php use craft\elements\Tag; use Faker\Generator; return [ // Add your fakery jobs "jobs" => [ 'tag' => function (Tag $tag, Generator $faker) { $tag->title = $faker->company; $tag->groupId = 1; return $tag; } ], ];
Run the jobs through the console command ./craft faker --job=tag --count=100 --element=tag
, (*12)
Brought to you by Superbig, (*13)