tkachikov/laravel-withtrashed
最新稳定版本:1.0.2
Composer 安装命令:
composer require tkachikov/laravel-withtrashed
包简介
Trait for set magic method withTrashed for models with SoftDelete
README 文档
README
Trait for set magic method withTrashed for models with SoftDelete
Usage
use Tkachikov\LaravelWithtrashed\WithTrsashed; class User { use WithTrashed; public function posts() { return $this->hasMany(Post::class); } } $posts = $user->posts; // default $postsWithTrashed = $user->postsWithTrashed; // using trait $postsBuilder = $user->posts(); //default $postsBuilderWithTrashed = $user->postsWithTrashed(); // using trait $userPosts = User::with('posts')->first(); // default $userPostsWithTrashed = User::with('postsWithTrashed')->first(); // using trait
License
This package is open-sourced software licensed under the MIT license.
统计信息
- 总下载量: 3.38k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 1
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-05-31