Initial Commit
The initial public commit of MVGL website code.
This commit is contained in:
commit
b39ecf1638
2043 changed files with 215154 additions and 0 deletions
52
app/Models/Game.php
Normal file
52
app/Models/Game.php
Normal file
|
@ -0,0 +1,52 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class Game extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'alt_titles',
|
||||
'platform_id',
|
||||
'description',
|
||||
'source',
|
||||
'boxart',
|
||||
'genre_ids',
|
||||
'developers',
|
||||
'publishers',
|
||||
'composers',
|
||||
'website',
|
||||
'na_release_date',
|
||||
'eu_release_date',
|
||||
'jp_release_date',
|
||||
'aus_release_date',
|
||||
'esrb_rating',
|
||||
'pegi_rating',
|
||||
'cero_rating',
|
||||
'acb_rating',
|
||||
'requested_by',
|
||||
'added_by'
|
||||
];
|
||||
|
||||
/**
|
||||
* Game relation to platform model
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
*/
|
||||
public function platform()
|
||||
{
|
||||
return $this->hasOne(Platform::class, 'id', 'platform_id');
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue