Files
RomhackPlaza/app/Models/Platform.php
2026-06-08 16:25:52 +02:00

28 lines
457 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
class Platform extends Model
{
/**
* @var string[]
*/
protected $fillable = [
'name', 'slug', 'short_name'
];
public function games(): HasMany
{
return $this->hasMany(Game::class);
}
public function entries(): HasMany
{
return $this->hasMany(Entry::class);
}
}