evostudio/deactivation
最新稳定版本:1.2
Composer 安装命令:
composer require evostudio/deactivation
包简介
Add deactivation field for Eloquent models
README 文档
README
This package allows you to add trait (similar to soft deletes) for Laravel Eloquent models.
In our projects we usually use soft deletes for models. When customers delete an object in the application, e.g. in the administration panel, they are usually not interested in whether the record was actually deleted from the table or just marked as deleted by using soft deletes. However, there is often a need to temporarily hide an object, e.g. an article, user or a dictionary entry.
Then we use deactivable trait.
Installation
Install the package via Composer:
$ composer require evostudio/deactivation
The package will automatically register its service provider.
Updating your Eloquent Models
Your models should use the Deactivable trait.
use EvoStudio\Deactivation\Deactivable; class Client extends Model { use Deactivable; }
统计信息
- 总下载量: 497
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-03-04