source: app/Models/ArtistImage.php

Last change on this file was dfae77e, checked in by Igor Danilovski <igor_danilovski@…>, 2 years ago
  • Initial commit;
  • Property mode set to 100644
File size: 578 bytes
RevLine 
[dfae77e]1<?php
2
3namespace App\Models;
4
5use Illuminate\Database\Eloquent\Factories\HasFactory;
6use Illuminate\Database\Eloquent\Model;
7use Illuminate\Database\Eloquent\Relations\BelongsTo;
8
9class 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.