clrghouz/app/Models/Zone.php

29 lines
370 B
PHP
Raw Normal View History

2019-04-26 04:30:00 +00:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use App\Traits\ScopeActive;
2019-04-26 04:30:00 +00:00
class Zone extends Model
{
use ScopeActive;
2021-05-13 12:40:21 +00:00
/* RELATIONS */
public function domain()
{
return $this->belongsTo(Domain::class);
}
/* SCOPES */
/**
* Only query active records
*/
public function scopePublic()
{
return $this->where('public',TRUE);
}
2019-04-26 04:30:00 +00:00
}