<?php
 namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; class TicketRating extends Model { use HasFactory; protected $fillable = [ 'ticket_id', 'client_id', 'rating', 'comment', ]; protected $casts = [ 'rating' => 'integer', ]; public function ticket() { return $this->belongsTo(Ticket::class); } public function client() { return $this->belongsTo(Client::class); } } 