Files
cleargame/app/Models/Rating.php
T

34 lines
601 B
PHP
Raw Normal View History

2025-04-12 17:18:33 +03:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class Rating extends Model
{
use HasFactory;
protected $fillable = [
'user_id',
'game_id',
'rating',
2025-06-13 23:06:13 +03:00
'platform',
2025-04-12 17:18:33 +03:00
];
protected $casts = [
'rating' => 'integer',
];
public function user(): BelongsTo
{
return $this->belongsTo(User::class);
}
public function game(): BelongsTo
{
return $this->belongsTo(Game::class);
}
2025-06-13 23:06:13 +03:00
}