2021-08-11 13:45:30 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
|
2021-09-06 13:39:32 +00:00
|
|
|
use App\Traits\{ScopeActive,UsePostgres};
|
2021-08-11 13:45:30 +00:00
|
|
|
|
|
|
|
class Echoarea extends Model
|
|
|
|
{
|
2021-09-06 13:39:32 +00:00
|
|
|
use SoftDeletes,ScopeActive,UsePostgres;
|
2021-08-11 13:45:30 +00:00
|
|
|
|
|
|
|
/* RELATIONS */
|
|
|
|
|
|
|
|
public function addresses()
|
|
|
|
{
|
|
|
|
return $this->belongsToMany(Address::class);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function domain()
|
|
|
|
{
|
|
|
|
return $this->belongsTo(Domain::class);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function echomail()
|
|
|
|
{
|
|
|
|
return Echomail::select('*')
|
|
|
|
->where('echoarea_id',$this->id);
|
|
|
|
}
|
|
|
|
}
|