Skip to content

Sample data ​

Sample data for Webhaki store themes lives in its own repo, webhaki-seeders, outside the store projects, so each project stays close to upstream (see Rules and workflow).

Each folder in webhaki-seeders mirrors a project's layout: copy its database/ folder into the project root, then run the seeder.

FolderThemeStore projectGuide
hatstore/Hatstore (caps & hats shop)webhaki-store-hatstoreHatstore

To get sample data for another theme, fill in the request template.

How a theme's sample data is built ​

Every data set follows the same conventions, so they all install and behave the same way.

Layout ​

webhaki-seeders/<theme>/
├── database/seeders/
│   ├── <Theme>/
│   │   ├── <Theme>Seeder.php          entry point
│   │   └── <Theme>*Seeder.php         catalog, reviews, blog, pages, theme options, menus …
│   └── files/<theme>/<folder>/…       images, uploaded to the media root by folder
└── tools/                             scripts that (re)draw the images, if any

Plus a section for the theme in webhaki-seeders/README.md, and a page in this section.

Entry point ​

  • The class is Database\Seeders\<Theme>\<Theme>Seeder, run with:
    bash
    php artisan db:seed --class="Database\Seeders\<Theme>\<Theme>Seeder" --force
  • It does not edit the project's stock DatabaseSeeder or its seeders, so upstream merges stay clean.
  • It checks that the plugins it needs are active and stops if one is missing. It does not activate every plugin the way the stock prepareRun() does.
  • It warns when the theme is not the active one: theme options and widgets are saved per theme.

What it keeps and what it replaces ​

KeptWiped and refilled
Admin users, active plugins, the active theme, other settingsCatalog, orders, customers, blog, pages, menus, widgets, slugs, meta boxes, this theme's options

Run it on a store you are setting up

Seeding empties and refills the tables above, including all orders and customers. Never run it on live data.

Media ​

Images are uploaded to the media root by folder (products/, brands/, categories/, home/, news/, general/), not under a <theme>/ parent folder.

Content ​

  • Original names, texts and images. A reference site is followed for structure, section order, headlines and price ranges, not copied: no real brand names or trademarks, no downloaded product photos.
  • English only, unless the request asks for translations.

Checks before a data set is handed over ​

  • The seeder runs on the project's database.
  • Every main page returns 200.
  • The homepage, a listing and a product page are checked in screenshots.