Files
RomhackPlaza/app/Models/Platform.php

28 lines
457 B
PHP
Raw Normal View History

2026-05-20 18:25:15 +02:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
2026-06-08 16:25:52 +02:00
use Illuminate\Database\Eloquent\Relations\HasMany;
2026-05-20 18:25:15 +02:00
class Platform extends Model
{
/**
* @var string[]
*/
protected $fillable = [
'name', 'slug', 'short_name'
];
2026-06-08 16:25:52 +02:00
public function games(): HasMany
{
return $this->hasMany(Game::class);
}
public function entries(): HasMany
{
return $this->hasMany(Entry::class);
}
2026-05-20 18:25:15 +02:00
}