feat:implement RegisterController.php

This commit is contained in:
2026-08-16 10:50:53 -07:00
parent aea85618fc
commit 279375a19e
12 changed files with 758 additions and 12 deletions
+19 -6
View File
@@ -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);