28 lines
437 B
PHP
28 lines
437 B
PHP
<?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 */
|
|
|
|
public function addresses()
|
|
{
|
|
return $this->hasMany(Address::class)
|
|
->orderBy('region_id')
|
|
->orderBy('host_id')
|
|
->orderBy('node_id')
|
|
->orderBy('point_id');
|
|
}
|
|
|
|
/* CASTS */
|
|
} |