<?php
 namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; class KbVote extends Model { use HasFactory; protected $table = 'kb_votes'; protected $fillable = ['post_id', 'client_id', 'ip_address', 'vote']; public function post(): BelongsTo { return $this->belongsTo(KbArticle::class, 'post_id'); } public function client(): BelongsTo { return $this->belongsTo(Client::class, 'client_id'); } } 