25 lines
444 B
PHP
25 lines
444 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class InstantWin extends Model
|
|
{
|
|
|
|
protected $table = "instant_win";
|
|
|
|
public $timestamps = false;
|
|
|
|
protected $with = ['prize'];
|
|
|
|
public function prize()
|
|
{
|
|
return $this->belongsTo('App\Models\Prizes', 'prize_id');
|
|
}
|
|
|
|
public function participation()
|
|
{
|
|
return $this->hasOne('App\Models\Participation', 'instant_win_id');
|
|
}
|
|
}
|