Added echomail search and display

This commit is contained in:
Deon George
2021-08-29 11:48:27 +10:00
parent 12f9ee1960
commit 271f066667
7 changed files with 99 additions and 2 deletions

View File

@@ -2,6 +2,7 @@
namespace App\Models;
use Illuminate\Support\Collection;
use Jenssegers\Mongodb\Eloquent\Model;
use Jenssegers\Mongodb\Eloquent\SoftDeletes;
@@ -32,6 +33,18 @@ class Echomail extends Model implements Packet
->withTrashed();
}
/* ATTRIBUTES */
public function getPathAttribute($value): Collection
{
return Address::whereIn('id',$value)->get()->pluck('ftn3d');
}
public function getSeenByAttribute($value): Collection
{
return Address::whereIn('id',$value)->get()->pluck('ftn2d');
}
/* METHODS */
public function jsonSerialize(): array