2026-05-29 00:33:00 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
2026-05-29 09:37:07 +03:00
|
|
|
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
2026-05-29 00:33:00 +03:00
|
|
|
|
|
|
|
|
class Company extends Model
|
|
|
|
|
{
|
2026-05-29 09:37:07 +03:00
|
|
|
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
|
|
|
}
|