31 lines
513 B
PHP
31 lines
513 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
use App\Traits\{ScopeActive,UsePostgres};
|
|
|
|
class Echoarea extends Model
|
|
{
|
|
use SoftDeletes,ScopeActive,UsePostgres;
|
|
|
|
/* 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);
|
|
}
|
|
} |