Files
bm/public_html/app/Event.php
2025-09-24 13:26:28 +02:00

27 lines
778 B
PHP

<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Event extends Model
{
protected $fillable = ['title', 'image', 'start_date', 'end_date', 'text', 'reservation_id', 'available_seats', 'price_cat_a', 'price_cat_b', 'price_cat_c', 'amountSeats', 'payableWithCulturecard', 'shorttext', 'lions', 'starttime', 'room', 'hide_externally'];
public function categories(){
return $this->belongsToMany('App\Category','event_category');
}
public function reservation(){
return $this->belongsTo('App\Reservation', 'reservation_id');
}
public function seat(){
return $this->hasMany('App\Seat');
}
public function concessions(){
return $this->belongsToMany('App\Concession', 'event_concessions');
}
}