| 12345678910111213141516171819 |
- <?php
- namespace App\Models\Agent;
- use App\Models\BaseModel;
- class AgentApplication extends BaseModel
- {
- protected $table = 'agent_applications';
- protected $guarded = ['id'];
- protected $hidden = ['password_hash', 'withdraw_password_hash', 'pending_user_id', 'pending_username'];
- protected $casts = ['user_id' => 'integer', 'agent_id' => 'integer', 'reviewed_by' => 'integer', 'type' => 'integer'];
- protected $appends = ['type_text'];
- public function getTypeTextAttribute(): string
- {
- return Agent::TYPE_NAMES[(int) ($this->attributes['type'] ?? Agent::TYPE_JOINT)] ?? '';
- }
- }
|