*/ use HasApiTokens, HasFactory, Notifiable; /** * The attributes that are mass assignable. * * @var list */ protected $fillable = [ 'name', 'email', 'password', 'phone', 'address', 'role', 'last_login_at', 'phone_number', 'latitude', 'longitude', 'shop_description', 'profile_photo', ]; /** * The attributes that should be hidden for serialization. * * @var list */ protected $hidden = [ 'password', 'remember_token', ]; /** * Get the attributes that should be cast. * * @return array */ protected function casts(): array { return [ 'email_verified_at' => 'datetime', 'password' => 'hashed', 'last_login_at' => 'datetime', 'latitude' => 'decimal:7', 'longitude' => 'decimal:7', ]; } /** * Get the orders for the user. */ public function orders() { return $this->hasMany(Booking::class, 'customer_id'); } public function bookings() { return $this->hasMany(Booking::class, 'tailor_id'); } public function galleries() { return $this->hasMany(TailorGallery::class); } public function reviews() { return $this->hasMany(TailorRating::class, 'tailor_id'); } public function specializations() { return $this->belongsToMany(TailorSpecialization::class); } }