WowPress-Tailwind/theme/wowpress/Models/Log.php

29 lines
652 B
PHP

<?php
namespace WoWPress\Models;
use Wenprise\Eloquent\Model;
use WoWPress\Api\BattleNet;
class Log extends Model
{
protected $table = "wowpress_log";
protected $primaryKey = 'ID';
protected $guarded = ['ID'];
const LOG_DEFAULT = "log.default";
const LOG_LOOT = "log.sks.loot";
const LOG_ROLL = "log.sks.roll";
const LOG_SIGNUP = "log.raid.signup";
const LOG_COMPLAINT_DELETE = "log.complaint.delete";
public static function write(string $message,string $action = Log::LOG_DEFAULT){
$log = new Log();
$log->message = $message;
$log->action = $action;
$log->save();
}
}