Generate fake data for testing.
This package is auto-updated.
Last update: 2023-11-15 10:07:19 UTC
This extension allows you to generate fake data to test your forum.
You choose the number of new users, discussions and posts.
If you do not create new users, random existing users will be picked as authors for new discussions and posts. Alternatively, a list of user-provided user IDs can be used (REST API and command line only).
If you do not create new discussions, random existing discussions will be picked for new posts. Alternatively, a list of user-provided discussion IDs can be used (REST API and command line only).
A new button is added on discussions if you want to generate replies to that discussion only.
The date seed is made of two options: start date will be parsed by
Carbon::parse(), so it accepts dates in many formats (example
2021-01-01 15:00:00) as well as human time (example
2 days ago).
Date interval is in seconds.
Every time the seed needs a date, the interval will be used to make it unique (user join date, discussion creation time, reply time, ...)
If you generate many records at once with the default date settings, part of the content will end up a few minutes or hours in the future.
The extension can be used via 3 different methods:
- Via the Flarum frontend, in the admin panel (global seed) or in the discussion action dropdown (discussion seed).
- Via the command line. Run
php flarum help migratetoflarum:fake-datato view the list of options.
- Via the REST API. Perform a
/api/fake-data. The body can be JSON or any format recognized by Flarum. The parameters have the same name as the command line, for example
Even though the feature is restricted to admin accounts, It's probably best to not install this on a production forum!
There is no way to mass delete the generated data.
composer require migratetoflarum/fake-data
This is a free extension by MigrateToFlarum, an online forum migration tool (launching soon). Follow us on Twitter for updates https://twitter.com/MigrateToFlarum
Need a custom Flarum extension ? Contact Clark Winkelmann !