diff --git a/app/Http/Controllers/AssetMaintenancesController.php b/app/Http/Controllers/AssetMaintenancesController.php index 4eff782762..326b2b89b3 100644 --- a/app/Http/Controllers/AssetMaintenancesController.php +++ b/app/Http/Controllers/AssetMaintenancesController.php @@ -145,7 +145,7 @@ class AssetMaintenancesController extends Controller 'completion_date' => $maintenance->completion_date, 'user_id' => ($maintenance->admin) ? (string)link_to('/admin/users/'.$maintenance->admin->id.'/view', $maintenance->admin->fullName()) : '', 'actions' => $actions, - 'companyName' => ($maintenance->asset->company) ? $maintenance->asset->company->name : '' + 'companyName' => ($maintenance->asset && $maintenance->asset->company) ? $maintenance->asset->company->name : '' ); } diff --git a/resources/views/hardware/view.blade.php b/resources/views/hardware/view.blade.php index 26eb06dea0..85fc0b9113 100755 --- a/resources/views/hardware/view.blade.php +++ b/resources/views/hardware/view.blade.php @@ -536,7 +536,11 @@ @foreach ($asset->assetmaintenances as $assetMaintenance) @if (is_null($assetMaintenance->deleted_at))