<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class FrontendSection extends Model
{
    use \Cviebrock\EloquentSluggable\Sluggable;

    protected $fillable = [
        'title',
        'slug',
        'hint',
        'content',
    ];

    public $timestamps = false;

    /**
     * Return the sluggable configuration array for this model.
     */
    public function sluggable(): array
    {
        return [
            'slug' => [
                'source' => 'title',
            ],
        ];
    }

    public function getRouteKeyName()
    {
        return 'slug';
    }

    public function casts(): array
    {
        return [
            'content' => 'array',
        ];
    }
}
