/home/bdqbpbxa/api-uniferx.goodface.com.ua/app/Models/Flyer.php
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Flyer extends Model
{
    use HasFactory;

    protected $table = 'flyers';

    protected $fillable = [
        'system_name',
        'title',
        'file',
        'is_enabled',
    ];

    protected $casts = [
        'file' => 'array',
    ];


    public function countries()
    {
        return $this->belongsToMany(
            Country::class,
            'flyer_countries',
        );
    }
}