refactor: update user model casts and relations
This commit is contained in:
+7
-5
@@ -6,11 +6,13 @@
|
|||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
|
use App\Enums\UserGender;
|
||||||
|
use App\Enums\UserMarital;
|
||||||
|
use App\Enums\UserStatus;
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use Illuminate\Database\Eloquent\Collection;
|
use Illuminate\Database\Eloquent\Collection;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
||||||
use Illuminate\Foundation\Auth\User as Authenticate;
|
use Illuminate\Foundation\Auth\User as Authenticate;
|
||||||
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class User
|
* Class User
|
||||||
@@ -52,9 +54,9 @@ class User extends Authenticate
|
|||||||
'file_id' => 'int',
|
'file_id' => 'int',
|
||||||
'city_id' => 'int',
|
'city_id' => 'int',
|
||||||
'province_id' => 'int',
|
'province_id' => 'int',
|
||||||
'gender' => 'int',
|
'gender' => UserGender::class,
|
||||||
'marital_status' => 'int',
|
'marital_status' => UserMarital::class,
|
||||||
'status' => 'bool'
|
'status' => UserStatus::class
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $hidden = [
|
protected $hidden = [
|
||||||
|
|||||||
Reference in New Issue
Block a user