38 lines
712 B
PHP
38 lines
712 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class Log extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
public $timestamps = ["created_at"];
|
|
const UPDATED_AT = null;
|
|
|
|
/**
|
|
* The attributes that are mass assignable.
|
|
*
|
|
* @var array<int, string>
|
|
*/
|
|
protected $fillable = [
|
|
'action',
|
|
'ip',
|
|
'source_type',
|
|
'user_agent'
|
|
];
|
|
|
|
public function changed(): BelongsTo
|
|
{
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
|
|
public function editor(): BelongsTo
|
|
{
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
}
|