alirezadp10/seeder
Composer 安装命令:
composer require alirezadp10/seeder
包简介
Improving seeding functionality of Laravel framework.
关键字:
README 文档
README
Made Laravel Seeding More Useful
😞 Problem
Assume you have an application and in the middle of developing you should inject some data in your existing tables.
So you write your seeder and put insertion query and do your right thing and in the end you come to a question.
How run this seeder in different environments only once and not more?
The problem is this data should insert to all environments And you don't sure this seeder doesn't execute more than once.
💥 Solution
Seeder is a layer that changes Laravel seeding behavior slightly.
By the way, the seeding approach that is currently used in laravel, doesn't have support for seeding classes one time per running.
With this package you can define your seeders like before, but the task of executing them, is the responsibility of php artisan seed command.
By doing that you can put seed command in your CI configuration without worrying about some seeders execute several times.
📥 Installation
You can install the package via composer:
composer require alirezadp10/seeder
Create seeds table:
php artisan migrate
You can also migrate previous seeders file to new style if you want:
php artisan seeder:update
❗ Notice
After installing this package your seeder files generate like migration files, which you are already familiar with them.
License
MIT
统计信息
- 总下载量: 22
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-02-11