diff --git a/app/Http/Controllers/DomainController.php b/app/Http/Controllers/DomainController.php index 697df8d..904d0f2 100644 --- a/app/Http/Controllers/DomainController.php +++ b/app/Http/Controllers/DomainController.php @@ -118,7 +118,7 @@ class DomainController extends Controller if (! $o->public && ! Gate::check('admin',$o)) abort(404); - $o->load(['zones.system','zones.domain','zones.addresses.nodes_hub']); + $o->load(['zones.system','zones.domain','zones.addresses.nodes_hub','zones.addresses.echomail_from']); return view('domain.view') ->with('o',$o); diff --git a/app/Models/Address.php b/app/Models/Address.php index 3257f4e..924e725 100644 --- a/app/Models/Address.php +++ b/app/Models/Address.php @@ -534,7 +534,9 @@ class Address extends Model public function echomail_from() { - return $this->hasMany(Echomail::class,'fftn_id','id'); + return $this->hasMany(Echomail::class,'fftn_id','id') + ->orderBy('datetime','DESC') + ->limit(10); } /** diff --git a/resources/views/domain/view.blade.php b/resources/views/domain/view.blade.php index 9dc9743..2bbd196 100644 --- a/resources/views/domain/view.blade.php +++ b/resources/views/domain/view.blade.php @@ -126,7 +126,7 @@