Files
nexusphp/app/Models/News.php

28 lines
476 B
PHP
Raw Normal View History

<?php
namespace App\Models;
2025-10-12 03:48:04 +07:00
use App\Models\Traits\NexusActivityLogTrait;
class News extends NexusModel
{
2025-10-12 03:48:04 +07:00
use NexusActivityLogTrait;
protected $table = 'news';
protected $fillable = [
'userid', 'added', 'title', 'body', 'notify',
];
protected $casts = [
'added' => 'datetime',
];
public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo
{
return $this->belongsTo(User::class, 'userid');
}
}