reconstruction of the project
This commit is contained in:
@@ -7,10 +7,7 @@ use App\Models\BaseModel;
|
||||
class AdminNotificationSubject extends BaseModel
|
||||
{
|
||||
protected $table = 'admin_notification_subjects';
|
||||
protected $primaryKey = 'id';
|
||||
public $timestamps = true;
|
||||
const CREATED_AT = 'created_at';
|
||||
const UPDATED_AT = 'updated_at';
|
||||
|
||||
protected $fillable = [
|
||||
'admin_id',
|
||||
'subject',
|
||||
@@ -18,8 +15,15 @@ class AdminNotificationSubject extends BaseModel
|
||||
'updated_at',
|
||||
];
|
||||
|
||||
// CI uses created_at / updated_at
|
||||
public $timestamps = true;
|
||||
protected $casts = [
|
||||
'admin_id' => 'integer',
|
||||
];
|
||||
|
||||
// Optional relationship (if your admins are in users table)
|
||||
public function admin()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'admin_id');
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user