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

40 lines
901 B
PHP
Raw Normal View History

2020-10-21 15:26:21 +02:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* GainView.
*
* @property string $name Name
* @property string $file_name Name of the view file.
* @property-read \Illuminate\Support\Carbon $created_at Creation Date.
* @property-read \Illuminate\Support\Carbon $updated_at Last update Date.
*
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Prizes[] $prizes
* Associated prizes.
*/
2020-10-21 15:26:21 +02:00
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
*
2022-08-11 10:26:29 +02:00
* @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
}
}