Files
hatame.andarza09/app/Models/User.php
T

80 lines
1.4 KiB
PHP

<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
/**
* Class User
*
* @property int $id
* @property string $Firstname
* @property string $Lastname
* @property string $national_code
* @property int $gender
* @property int $marital_status
* @property string|null $spouse_name
* @property string $mobile
* @property string $email
* @property string|null $profile_image
* @property string $username
* @property string $password
* @property string|null $province
* @property string|null $city
* @property int $status
* @property Carbon $created_at
* @property Carbon $updated_at
*
* @property Collection|Comment[] $comments
* @property Collection|Favorite[] $favorites
*
* @package App\Models
*/
class User extends Model
{
protected $table = 'users';
protected $casts = [
'gender' => 'int',
'marital_status' => 'int',
'status' => 'int'
];
protected $hidden = [
'password'
];
protected $fillable = [
'first_name',
'last_name',
'national_code',
'gender',
'marital_status',
'spouse_name',
'mobile',
'email',
'profile_image',
'username',
'password',
'province',
'city',
'status'
];
public function comments()
{
return $this->hasMany(Comment::class);
}
public function favorites()
{
return $this->hasMany(Favorite::class);
}
}