<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use App\Traits\HasImageUrl;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;

class Industry extends Model
{
    use HasImageUrl;
    protected $hidden = ['pivot'];
    protected $fillable = [
        'name',
        'mini_description',
        'icon',
        'banner',
        'title',
        'title_description',
        'first_paragraph',
        'first_image',
        'second_image',
        'second_paragraph',
        'booking_title',
        'booking_description',
        'solutions',
        'solutions_title',
        'solutions_icon',
        'key_benefits',
        'key_benefits_title',
        'title_testimonials',
        'description_testimonials',
        'cta_title',
        'cta_mini_description',
        'meta_title',
        'meta_description',
        'meta_keyword',
    ];

    protected $casts = [
        'key_benefits' => 'array',
    ];
    public function industryCategory(): BelongsToMany
    {
        return $this->belongsToMany(IndustryCategory::class, 'industries_categories');
    }
}
