feat:implement RegisterController.php
This commit is contained in:
+19
-6
@@ -26,15 +26,16 @@ use Illuminate\Foundation\Auth\User as Authenticated;
|
||||
* @property int|null $file_id
|
||||
* @property string $username
|
||||
* @property string $password
|
||||
* @property string $password_confirmation
|
||||
* @property string $user_Province
|
||||
* @property string $user_city
|
||||
* @property int $province_id
|
||||
* @property int $city_id
|
||||
* @property int $status
|
||||
* @property Carbon $created_at
|
||||
* @property Carbon $updated_at
|
||||
* @property Carbon $deleted
|
||||
*
|
||||
* @property File|null $file
|
||||
* @property Province $province
|
||||
* @property City $city
|
||||
* @property Collection|Booking[] $bookings
|
||||
* @property Collection|Comment[] $comments
|
||||
*
|
||||
@@ -43,11 +44,14 @@ use Illuminate\Foundation\Auth\User as Authenticated;
|
||||
class User extends Authenticated
|
||||
{
|
||||
protected $table = 'users';
|
||||
public static $snakeAttributes = false;
|
||||
|
||||
protected $casts = [
|
||||
'gender' => 'int',
|
||||
'marital_status' => 'int',
|
||||
'file_id' => 'int',
|
||||
'province_id' => 'int',
|
||||
'city_id' => 'int',
|
||||
'status' => 'int',
|
||||
'deleted' => 'datetime'
|
||||
];
|
||||
@@ -68,9 +72,8 @@ class User extends Authenticated
|
||||
'file_id',
|
||||
'username',
|
||||
'password',
|
||||
'password_confirmation',
|
||||
'user_Province',
|
||||
'user_city',
|
||||
'province_id',
|
||||
'city_id',
|
||||
'status',
|
||||
'deleted'
|
||||
];
|
||||
@@ -80,6 +83,16 @@ class User extends Authenticated
|
||||
return $this->belongsTo(File::class);
|
||||
}
|
||||
|
||||
public function province()
|
||||
{
|
||||
return $this->belongsTo(Province::class);
|
||||
}
|
||||
|
||||
public function city()
|
||||
{
|
||||
return $this->belongsTo(City::class);
|
||||
}
|
||||
|
||||
public function bookings()
|
||||
{
|
||||
return $this->hasMany(Booking::class);
|
||||
|
||||
Reference in New Issue
Block a user