Add rank management feature with CRUD and UI
Introduces a new rank management system including the Rank model, migrations for the ranks table and user IP address, Livewire components for managing and displaying ranks, and related Blade views. Updates navigation and routes to include the new 'Gestión Rangos' section, and enhances the ShareCodeComponent with user data. Also adds a reusable input field component for forms.
This commit is contained in:
+5
-5
@@ -23,11 +23,11 @@ class User extends Authenticatable
|
||||
'rol_id',
|
||||
'subvendedor_id',
|
||||
'subvendedor',
|
||||
'ip_address',
|
||||
|
||||
'referral_code',
|
||||
'parent_id',
|
||||
|
||||
|
||||
'rank_id',
|
||||
];
|
||||
|
||||
@@ -126,10 +126,10 @@ class User extends Authenticatable
|
||||
return $this->hasMany(User::class, 'parent_id')->orderBy('created_at', 'desc');
|
||||
}
|
||||
|
||||
// public function rank()
|
||||
// {
|
||||
// return $this->belongsTo(Rank::class);
|
||||
// }
|
||||
public function rank()
|
||||
{
|
||||
return $this->belongsTo(Rank::class, 'rank_id');
|
||||
}
|
||||
|
||||
protected static function boot()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user