ldc-gen-game-web/app/Models/GainView.php

25 lines
446 B
PHP
Raw Permalink Normal View History

2020-10-21 15:26:21 +02:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class GainView extends Model
{
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = ['name', 'file_name'];
2020-10-21 15:26:21 +02:00
2022-08-11 10:26:29 +02:00
/**
* Prize relation
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
2021-08-18 17:08:02 +02:00
public function prizes()
{
return $this->hasMany(Prize::class, 'gain_view_id');
2020-10-21 15:26:21 +02:00
}
}