'Show', '0' => 'Hide', ]; public const MENU_TYPE = [ 'Normal' => 'Normal', 'Special' => 'Special', ]; public const SHOW_PRICES_RADIO = [ '1' => 'Yes', '0' => 'No', ]; public const MENU_PRODUCTION_DAYS = [ '1' => 'Yes', '0' => 'No', ]; protected $dates = [ 'start_date', 'end_date', 'created_at', 'updated_at', 'deleted_at', ]; protected $fillable = [ 'name', 'alternate_name', 'menu_type', 'special_menu_category_id', 'status', 'start_date', 'end_date', 'cycle', 'x_week', 'days', 'menu_production_days', 'consumtion_date', 'delivery_date', 'show_prices', 'price', 'cut_off_days', 'qguard_menu_id', 'created_at', 'updated_at', 'deleted_at', ]; protected $casts = [ 'consumtion_date' => 'array', 'delivery_date' => 'array', 'days' => 'array', ]; protected function serializeDate(DateTimeInterface $date) { return $date->format('Y-m-d H:i:s'); } public function allergens() { return $this->belongsToMany(Allergence::class,'menu_allergence')->withTimestamps(); } public function diet() { return $this->belongsToMany(Diet::class,'menu_diet')->withTimestamps(); } public function tag() { return $this->belongsToMany(tag::class,'menu_tag')->withTimestamps(); } public function menulocation() { return $this->belongsToMany(MenuLocation::class, 'menu_menulocation')->withTimestamps(); } public function meal() { return $this->belongsToMany(Meal::class, 'menu_meal')->withTimestamps(); } public function group() { return $this->belongsToMany(GroupMaster::class, 'menu_group')->withTimestamps(); } public function menumapping() { return $this->hasMany(MenuMapping::class); } public function category() { return $this->belongsTo(MenuCategory::class, 'special_menu_category_id'); } }