ponepaste/includes/Models/AdminLog.php

26 lines
546 B
PHP
Raw Normal View History

2021-11-02 08:46:40 -04:00
<?php
namespace PonePaste\Models;
use Illuminate\Database\Eloquent\Model;
class AdminLog extends Model {
public const ACTION_LOGIN = 0;
public const ACTION_FAIL_LOGIN = 1;
public const ACTION_EDIT_CONFIG = 2;
2023-05-12 02:06:31 -04:00
public const ACTION_NAMES = [
'Login',
'Failed Login',
'Edit Config'
];
2021-11-02 08:46:40 -04:00
protected $table = 'admin_logs';
protected $fillable = ['user_id', 'action', 'ip', 'time'];
public $timestamps = false;
public function user() {
return $this->belongsto(User::class);
}
2021-11-02 08:46:40 -04:00
}