'integer', 'booking_id' => 'integer', 'customer_id' => 'integer', 'tailor_id' => 'integer', 'rating' => 'decimal:1' ]; /** * Get the booking that owns the rating. */ public function booking() { return $this->belongsTo(Booking::class); } /** * Get the customer who gave the rating. */ public function customer() { return $this->belongsTo(User::class, 'customer_id'); } /** * Get the tailor who received the rating. */ public function tailor() { return $this->belongsTo(User::class, 'tailor_id'); } }