From d8d800bb7a77b8b7549c307e1c08e9e0d331979b Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 1 Dec 2016 00:55:00 -0800 Subject: [PATCH] =?UTF-8?q?Fixes=20#2997=20-=20don=E2=80=99t=20include=20s?= =?UTF-8?q?oft-deleted=20maintenances?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/AssetMaintenancesController.php | 3 +-- app/Models/Asset.php | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/AssetMaintenancesController.php b/app/Http/Controllers/AssetMaintenancesController.php index b3a597ece11f..4eff78276257 100644 --- a/app/Http/Controllers/AssetMaintenancesController.php +++ b/app/Http/Controllers/AssetMaintenancesController.php @@ -76,8 +76,7 @@ public function getIndex() */ public function getDatatable() { - $maintenances = AssetMaintenance::with('asset', 'supplier', 'asset.company','admin') - ->withTrashed(); + $maintenances = AssetMaintenance::with('asset', 'supplier', 'asset.company','admin'); if (Input::has('search')) { $maintenances = $maintenances->TextSearch(e(Input::get('search'))); diff --git a/app/Models/Asset.php b/app/Models/Asset.php index 44554738df73..f26beb968e5e 100644 --- a/app/Models/Asset.php +++ b/app/Models/Asset.php @@ -329,8 +329,7 @@ public function assetmaintenances() { return $this->hasMany('\App\Models\AssetMaintenance', 'asset_id') - ->orderBy('created_at', 'desc') - ->withTrashed(); + ->orderBy('created_at', 'desc'); } /**