*/ protected $fillable = [ 'slug', 'payment_type', 'status', 'artist_id', 'event_id', ]; /** * The attributes that are not mass assignable. * @var string[] */ protected $guarded = [ 'price', ]; /** * The attributes that should be cast. * * @var array */ protected $casts = [ 'completed_at' => 'datetime', ]; public function artist(): BelongsTo { return $this->belongsTo(Artist::class, 'artist_id'); } public function event(): BelongsTo { return $this->belongsTo(Event::class); } public function comments(): HasMany { return $this->hasMany(OfferComment::class)->orderBy('created_at', 'desc'); } public function transactions(): HasMany { return $this->hasMany(Transaction::class); } }