| Server IP : 65.108.144.40 / Your IP : 216.73.217.165 Web Server : Apache/2.4.52 (Ubuntu) System : Linux ubuntu-8gb-hel1-1 5.15.0-173-generic #183-Ubuntu SMP Fri Mar 6 13:29:34 UTC 2026 x86_64 User : dev ( 1000) PHP Version : 8.2.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/project-slim/app/Models/ |
Upload File : |
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class UserFlag extends BaseModel
{
/**
* The table associated with the model.
*/
protected $table = 'repo_user_flags';
/**
* The primary key for the model.
*/
protected $primaryKey = 'flag_id';
/**
* The attributes that are mass assignable.
*/
protected $fillable = [
'user_id',
'flag_key',
'flag_value'
];
/**
* The attributes that should be hidden for serialization.
* Inherits from BaseModel to hide all ID fields
*/
protected $hidden = [
'id',
'flag_id',
'user_id',
'company_id',
'role_id',
'report_id',
'module_id'
];
/**
* The attributes that should be cast to native types.
*/
protected $casts = [
'flag_value' => 'boolean',
'created_at' => 'datetime',
];
/**
* Get the user that owns the flag.
*/
public function user(): BelongsTo
{
return $this->belongsTo(User::class, 'user_id', 'user_id');
}
}