2020-10-21 15:26:21 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
|
|
|
|
|
class GainView extends Model
|
|
|
|
|
{
|
2022-01-11 12:39:28 +01:00
|
|
|
/**
|
|
|
|
|
* 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()
|
|
|
|
|
{
|
2022-01-11 12:39:28 +01:00
|
|
|
return $this->hasMany(Prize::class, 'gain_view_id');
|
2020-10-21 15:26:21 +02:00
|
|
|
}
|
|
|
|
|
}
|