Last change
on this file since dfae77e was dfae77e, checked in by Igor Danilovski <igor_danilovski@…>, 2 years ago |
|
-
Property mode
set to
100644
|
File size:
578 bytes
|
Line | |
---|
1 | <?php
|
---|
2 |
|
---|
3 | namespace App\Models;
|
---|
4 |
|
---|
5 | use Illuminate\Database\Eloquent\Factories\HasFactory;
|
---|
6 | use Illuminate\Database\Eloquent\Model;
|
---|
7 | use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
---|
8 |
|
---|
9 | class ArtistImage extends Model
|
---|
10 | {
|
---|
11 | use HasFactory;
|
---|
12 |
|
---|
13 | protected $table = 'artist_images';
|
---|
14 |
|
---|
15 | /**
|
---|
16 | * The attributes that are mass assignable.
|
---|
17 | *
|
---|
18 | * @var array<int, string>
|
---|
19 | */
|
---|
20 | protected $fillable = [
|
---|
21 | 'path',
|
---|
22 | 'artist_id',
|
---|
23 | ];
|
---|
24 |
|
---|
25 | public function artists(): BelongsTo
|
---|
26 | {
|
---|
27 | return $this->belongsTo(Artist::class, 'artist_id', 'user_id');
|
---|
28 | }
|
---|
29 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.