33 lines
614 B
PHP
33 lines
614 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
|
|
class Game extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
/**
|
|
* The attributes that are mass assignable.
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $fillable = [
|
|
'name',
|
|
'slug',
|
|
'thumbnail_url',
|
|
'category',
|
|
'is_active',
|
|
];
|
|
|
|
/**
|
|
* Get the player stats for the game.
|
|
*/
|
|
public function playerStats(): HasMany
|
|
{
|
|
return $this->hasMany(PlayerStats::class);
|
|
}
|
|
} |