Files
core/app/Models/Content/ContentHistory.php
T

35 lines
717 B
PHP

<?php
namespace App\Models\Content;
use App\Models\User;
use Illuminate\Database\Eloquent\Model;
/**
* Class ContentHistory
*/
class ContentHistory extends Model
{
use ModelTraits\ContentHistory;
protected $table = 'content_history';
// this table does not have created_at and updated_at fields
public $timestamps = false;
protected $fillable = [
'user_id',
'content_id',
'edit_batch',
'column',
'new_value',
'old_value'
];
/**
* Author of the change
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function author()
{
return $this->belongsTo(User::class, 'user_id');
}
}