24 lines
454 B
PHP
24 lines
454 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
|
|
|
class Platform extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = [
|
|
'igdb_id',
|
|
'name',
|
|
'slug',
|
|
'abbreviation',
|
|
];
|
|
|
|
public function games(): BelongsToMany
|
|
{
|
|
return $this->belongsToMany(Game::class);
|
|
}
|
|
}
|