34 lines
579 B
PHP
34 lines
579 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Supervisor extends Model
|
|
{
|
|
protected $fillable = [
|
|
'name',
|
|
'provider_id',
|
|
'sport_id',
|
|
'sleep',
|
|
'limit',
|
|
'runtime',
|
|
'maxsconds',
|
|
'lastcall',
|
|
'is_cron',
|
|
'is_active',
|
|
'days_from',
|
|
'days_to',
|
|
];
|
|
|
|
public function sport()
|
|
{
|
|
return $this->belongsTo(Sport::class)->where('is_active', 1);
|
|
}
|
|
|
|
public function provider()
|
|
{
|
|
return $this->belongsTo(Provider::class);
|
|
}
|
|
}
|