felipedecampos/laravel-soft-archive
Composer 安装命令:
composer require felipedecampos/laravel-soft-archive
包简介
This is a package to extends soft delete to use to archive models.
README 文档
README
This is a package to extends soft delete to use to archive models.
Installation
You can install the package via composer:
composer require felipedecampos/laravel-soft-archive
Optionally you can publish the configfile with:
php artisan vendor:publish --provider="FelipeDeCampos\LaravelSoftArchive\Providers\ArchiveServiceProvider" --tag="config"
Usage
Add the soft archive trait to your model, like the example below:
class ArchivedModel extends Model { use SoftArchives; }
To archive the entity use the archive() method like the example below:
ArchivedModel::withoutArchived()->find($id)->archive();
To activate the entity use the unarchive() method like the example below:
ArchivedModel::withArchived()->find($id)->unarchive();
Testing
vendor/bin/phpunit
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email felipe.campos.programador@gmail.com instead of using the issue tracker.
Postcardware
You're free to use this package, but if it makes it to your production environment we highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using.
Our address is: Av. Bartholomeu de Carlos, 747 Apto. 32A - Jardim Flor da Montanha, São Paulo / Brazil.
We publish all received postcards on our company website.
Credits
Support us
Bettorld is a webdesign agency based in São Paulo, Brazi. You'll find an overview of all our open source projects on our website.
Does your business depend on our contributions? Reach out and support us on Patreon. All pledges will be dedicated to allocating workforce on maintenance and new awesome stuff.
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-02-20