<?php

    namespace App\Models;

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

    class Tab extends ContentTypeModel
    {
        use LanguageSupportTrait;

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

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

        protected $casts = [];

        public function tabItems() {
            return $this->belongsToMany(TabItem::class)->withPivot('position');
        }

        public function block() {
            return $this->belongsToMany(Block::class)->withPivot('position');
        }

    }
