<?php

namespace App\Models\GenericBackoffice;

use App\Libs\Database\Eloquent\ContentTypeModel;
use App\Models\GenericBackoffice\Traits\LanguageSupportTrait;
use App\Models\MediaItem;

class Food extends ContentTypeModel
{
    use LanguageSupportTrait;

    protected $hidden = ['languages', "websites"];
    protected $with = ['languages', "websites"];

    protected $dates = [];
    protected $spatialFields = [];

    public function allergens()
    {
        return $this->belongsToMany(Allergen::class, "food_allergen")->withPivot(['position']);
    }

}
