<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Spatie\Activitylog\Traits\LogsActivity;
use Spatie\Activitylog\LogOptions;

class Home extends Model
{
    use HasFactory, LogsActivity;

    protected $fillable = [
        'main_title', 'main_description',
        'top_image',
        'count_items',
        'gallery_count',
        'news_count',
        'program_count',
        'bottom_image',
        'bottom_text',

    ];

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

    public function getActivitylogOptions(): \Spatie\Activitylog\LogOptions
    {
        return \Spatie\Activitylog\LogOptions::defaults()->logAll();
    }
}
