1 | <?php |
||
2 | |||
3 | namespace Yeelight\Traits; |
||
4 | |||
5 | use Yeelight\Models\Foundation\User; |
||
6 | |||
7 | /** |
||
8 | * Trait RelationUserTrait |
||
9 | * |
||
10 | * @category Yeelight |
||
11 | * |
||
12 | * @package Yeelight\Traits |
||
13 | * |
||
14 | * @author Sheldon Lee <[email protected]> |
||
15 | * |
||
16 | * @license https://opensource.org/licenses/MIT MIT |
||
17 | * |
||
18 | * @link https://www.yeelight.com |
||
19 | */ |
||
20 | trait RelationUserTrait |
||
21 | { |
||
22 | /** |
||
23 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
24 | */ |
||
25 | public function user() |
||
26 | { |
||
27 | return $this->belongsTo(User::class, 'user_id', 'user_id'); |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
28 | } |
||
29 | } |
||
30 |