<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class PageContent extends Model
{
    protected $fillable = ['page', 'key', 'value', 'type'];

    public static function getPage(string $page): array
    {
        return static::where('page', $page)
            ->get()
            ->pluck('value', 'key')
            ->toArray();
    }
}
