Files

17 lines
357 B
PHP
Raw Permalink Normal View History

2026-05-29 00:33:00 +03:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
2026-05-29 00:33:00 +03:00
class Company extends Model
{
protected $fillable = ['igdb_id', 'name', 'slug'];
public function games(): BelongsToMany
{
return $this->belongsToMany(Game::class, 'game_company')->withPivot('role');
}
2026-05-29 00:33:00 +03:00
}