Added echoareas and fileareas

This commit is contained in:
Deon George
2021-08-11 23:45:30 +10:00
parent c7388c2db6
commit eb0405f019
19 changed files with 773 additions and 48 deletions

31
app/Models/Echoarea.php Normal file
View File

@@ -0,0 +1,31 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use App\Traits\ScopeActive;
class Echoarea extends Model
{
use SoftDeletes,ScopeActive;
/* 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);
}
}