2021-06-17 14:08:30 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
|
|
|
use App\Traits\ScopeActive;
|
|
|
|
|
|
|
|
class System extends Model
|
|
|
|
{
|
|
|
|
use HasFactory,ScopeActive;
|
|
|
|
|
|
|
|
/* SCOPES */
|
|
|
|
|
|
|
|
/* RELATIONS */
|
|
|
|
|
2021-06-20 13:03:20 +00:00
|
|
|
public function addresses()
|
|
|
|
{
|
|
|
|
return $this->hasMany(Address::class)
|
|
|
|
->orderBy('region_id')
|
|
|
|
->orderBy('host_id')
|
|
|
|
->orderBy('node_id')
|
|
|
|
->orderBy('point_id');
|
|
|
|
}
|
|
|
|
|
2021-06-17 14:08:30 +00:00
|
|
|
/* CASTS */
|
|
|
|
}
|