lunarphp/demo-data 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

lunarphp/demo-data

Composer 安装命令:

composer require lunarphp/demo-data

包简介

Lunar demo data seeder

README 文档

README

Seeds a coherent, reproducible demo store — catalogue, customers, and orders spanning the full order lifecycle — for evaluation, screenshots, and admin verification. Data only; there is no storefront UI.

This is a development/showcase tool, not part of Lunar's public contract surface. Its generators and seeders may change shape between versions without a Rector rule or upgrade path.

Install

It is a dev-only dependency — install it under require-dev so a production composer install --no-dev omits it entirely:

composer require --dev lunarphp/demo-data

Usage

php artisan lunar:demo-data            # seed at the default scale
php artisan lunar:demo-data --scale=medium
php artisan lunar:demo-data --fresh    # wipe demo-owned tables, then seed
php artisan lunar:demo-data --force    # required to run in a production environment

The command refuses to run in production without --force, mirroring Laravel's own migrate:fresh / db:wipe. Without --fresh it is a no-op once the store is seeded; use --fresh to wipe the demo-owned tables and rebuild.

Seeding is reproducible at the structural level — the same scale always yields the same catalogue, the same order coverage, and the same counts (faker is seeded from a fixed value in config/demo-data.php). Cosmetic faker output (customer names, addresses) is best-effort: the framework draws from the global RNG stream mid-seed, so those values are not byte-identical between runs.

DemoDataSeeder is also callable from a host DatabaseSeeder:

$this->call(\Lunar\DemoData\Database\Seeders\DemoDataSeeder::class);

Configuration

Publish the config to tune the faker seed, per-scale volumes, currencies, and the media disk:

php artisan vendor:publish --tag=lunar.demo-data

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-07-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固