quickclack/database-filler
最新稳定版本:1.0.0
Composer 安装命令:
composer require quickclack/database-filler
包简介
This package for creating and running fillers on laravel projects
README 文档
README
This package will help you update database data using php classes
Installation
composer require quickclack/database-filler:dev-master
Usage
- php artisan migrate
- create directory fillers in ./database
- php artisan make:filler UpdateProductPriceFiller
<?php
declare(strict_types = 1);
use Illuminate\Support\Facades\DB;
return new class
{
public function run(): void
{
DB::table('prices')
->where('product_id', '=', 1)
->update([
'price' => 18.99
]);
}
};
- php artisan db:fill
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 28
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-06-02