amrachraf6699/laravel-smart-seeder
Composer 安装命令:
composer require amrachraf6699/laravel-smart-seeder
包简介
Interactive artisan command that makes database seeding more flexible and friendly.
README 文档
README
Smart, conversational control over your database seeders. Instead of memorizing class names or blindly re-running php artisan db:seed, Smart Seeder walks you through a friendly menu where you can explore every available seeder, choose one (or more), or run everything without typing extra arguments.
Use it whenever you want a guided seeding experience—whether you're onboarding a teammate, debugging a migration, or scripting up something for CI where clarity matters.
Highlights
- A warm prompt that asks whether to run every seeder, the
DatabaseSeederentry point, or hand-pick one or more classes. - Intelligent discovery of classes inside
database/seeders, including nested folders, without any extra configuration. - Multiple-selection mode accepts indexes, full class names, or even fuzzy matches so you can type
usersinstead of the entire namespace. --forceand--class=shortcuts for automation-friendly workflows (CI, scripts, or when you know exactly what you want).- Gentle error messages when a seeder is missing or your selection is not understood.
Installation
composer require amrachraf6699/laravel-smart-seeder
Laravel auto-discovers the service provider, so the command is ready right away.
Usage (friendly mode)
$ php artisan db:smart-seed
What would you like to do?
[0] Run every seeder inside database/seeders
[1] Run the DatabaseSeeder entry point
[2] Choose one or more seeders manually
> 2
Seeders available in database/seeders:
[1] UsersTableSeeder
[2] ProductsTableSeeder
[3] OrdersTableSeeder
Enter the number(s) or class name(s) you want to run (comma separated) > 1,3
→ Database\Seeders\UsersTableSeeder
→ Database\Seeders\OrdersTableSeeder
The prompt accepts indexes, class names, or partial names, so you can type products instead of the full namespace and still hit the right target.
Quick shortcuts
Use --force when you want to run every discovered seeder without any prompts:
php artisan db:smart-seed --force
Target a specific seeder directly in scripts or automation with --class=:
php artisan db:smart-seed --class=UsersTableSeeder
Options & Flags
--force: skip prompts and seed everything that was found underdatabase/seeders.--class=: execute a fully qualified or short seeder name immediately.
Supported Laravel versions
Laravel 8.x through 12.x (the package sticks to standard service providers and works with PHP 8.1+).
Contributing & feedback
- Fork the repo and create a feature branch with descriptive commits.
- Keep the command logic inside
src/Consoleand follow PSR-12 formatting. - Open a pull request and share how you’re using the command or what feedback you have.
Run composer test (placeholder stub) before submitting, or explain why tests aren’t available yet.
License
MIT © Amr Achraf
amrachraf6699/laravel-smart-seeder 适用场景与选型建议
amrachraf6699/laravel-smart-seeder 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2 次下载、GitHub Stars 达 1, 最近一次更新时间为 2026 年 02 月 01 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 amrachraf6699/laravel-smart-seeder 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 amrachraf6699/laravel-smart-seeder 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 24
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-02-01