<?php

namespace App\Models;

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

class EmailContent extends Model
{
    use HasFactory;

    protected $table = 'email_content';

    protected $fillable = [
        'key',
        'content',
    ];
    
    
    public static function getContent($key)
    {
        $block = static::where('key', $key)->first();
        return $block->content;
    }

}