cmandersen/has-one-specific
Composer 安装命令:
composer require cmandersen/has-one-specific
包简介
Add a Laravel relationship where you can specify a set ID, instead of a dynamic relationship
README 文档
README
Add a Laravel relationship where you can specify a set ID, instead of a dynamic relationship
Installation
composer require cmandersen/has-one-specific
Usage
This package is basically just a trait that uses a relationship class, so it's just a case of using the trait where you need it.
class User extends Model { use \CMAndersen\HasOneSpecific\HasOneSpecific; public function company(){ return $this->hasOneSpecific(Company::class, 97); } }
统计信息
- 总下载量: 7.68k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-06-16