*/ protected $fillable = [ 'title', 'slug', 'city', 'country', 'description', 'event_type_id', 'organizer_id', ]; /** * The attributes that should be cast. * * @var array */ protected $casts = [ 'event_date' => 'date', ]; protected $dates = [ 'event_date', 'start_time', 'end_time' ]; public function event_type(): BelongsTo { return $this->belongsTo(EventType::class); } public function organizer(): BelongsTo { return $this->belongsTo(Organizer::class, 'organizer_id', 'user_id'); } public function offers(): HasMany { return $this->hasMany(Offer::class); } }