<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Page extends Model
{
    protected $fillable = ['slug', 'title', 'content', 'is_active', 'position'];

    public static function getBySlug($slug)
    {
        return static::where('slug', $slug)->where('is_active', 1)->first();
    }
}
