Contact us Search Login
← Back to blog
Duncan

Seeding demo content

Use PHP seeders with Statamic facades to generate repeatable demo data.

StatamicContentSeeder

This post (and the rest of the blog) was created by database/seeders/StatamicContentSeeder.php using Entry::make() and ->save().

Re-run anytime:

php artisan db:seed --class=StatamicContentSeeder
php please stache:clear

That's handy when you're experimenting and want a clean slate.