source: app/Models/ManagerInvite.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: 1.0 KB
Line 
1<?php
2
3namespace App\Models;
4
5use Illuminate\Database\Eloquent\Factories\HasFactory;
6use Illuminate\Database\Eloquent\Model;
7use Illuminate\Database\Eloquent\Relations\BelongsTo;
8use Illuminate\Database\Eloquent\Relations\HasOne;
9use Illuminate\Notifications\Notifiable;
10use Illuminate\Support\Facades\Hash;
11
12class ManagerInvite extends Model
13{
14 use HasFactory, Notifiable;
15
16 protected $table = 'manager_invites';
17
18 /**
19 * The attributes that are mass assignable.
20 *
21 * @var array<int, string>
22 */
23 protected $fillable = [
24 'email',
25 'artist_id',
26 ];
27
28 /**
29 * The attributes that should be hidden for serialization.
30 *
31 * @var array<int, string>
32 */
33 protected $hidden = [
34 'invitation_token',
35 ];
36
37 /**
38 * The attributes that should be cast.
39 *
40 * @var array<string, string>
41 */
42 protected $casts = [
43 'registered_at' => 'datetime',
44 ];
45
46 public function artist(): BelongsTo
47 {
48 return $this->belongsTo(Artist::class, 'artist_id', 'user_id');
49 }
50}
Note: See TracBrowser for help on using the repository browser.