<?php

namespace App\Models;

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

class ErrorLog extends BaseModel
{
    use HasFactory;

    public function scopeKeyword($query)
    {
        $keyword = request()->keyword;
        if($keyword) {
            return $query->where('message', 'like', "%$keyword%");
        }
        return $query;
    }

}
