Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
UsesUserModel | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
user | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | declare(strict_types=1); |
4 | |
5 | namespace Engelsystem\Models\User; |
6 | |
7 | use Illuminate\Database\Eloquent\Builder; |
8 | use Illuminate\Database\Eloquent\Relations\BelongsTo; |
9 | |
10 | /** |
11 | * @property int $user_id |
12 | * |
13 | * @property-read User $user |
14 | * |
15 | * @method static Builder|static[] whereUserId($value) |
16 | */ |
17 | trait UsesUserModel |
18 | { |
19 | // protected $fillable = ['user_id']; |
20 | // protected $casts = ['user_id' => 'integer]; |
21 | |
22 | public function user(): BelongsTo |
23 | { |
24 | return $this->belongsTo(User::class); |
25 | } |
26 | } |