Last change
on this file was dfae77e, checked in by Igor Danilovski <igor_danilovski@…>, 2 years ago |
|
-
Property mode
set to
100644
|
File size:
558 bytes
|
Rev | Line | |
---|
[dfae77e] | 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\HasMany;
|
---|
| 8 |
|
---|
| 9 | class ArtistType extends Model
|
---|
| 10 | {
|
---|
| 11 | use HasFactory;
|
---|
| 12 |
|
---|
| 13 | protected $table = 'artist_types';
|
---|
| 14 |
|
---|
| 15 | public $timestamps = false;
|
---|
| 16 |
|
---|
| 17 | /**
|
---|
| 18 | * The attributes that are mass assignable.
|
---|
| 19 | *
|
---|
| 20 | * @var array<int, string>
|
---|
| 21 | */
|
---|
| 22 | protected $fillable = [
|
---|
| 23 | 'name',
|
---|
| 24 | ];
|
---|
| 25 |
|
---|
| 26 | public function artists(): HasMany
|
---|
| 27 | {
|
---|
| 28 | return $this->hasMany(Artist::class);
|
---|
| 29 | }
|
---|
| 30 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.