first(); if (!empty($maintenance)) { $maintenance->delete(); } } /** * 删除资产故障记录(强制). * * @param $maintenance_id */ public static function maintenanceForceDelete($maintenance_id) { $maintenance = MaintenanceRecord::where('id', $maintenance_id) ->withTrashed() ->first(); if (!empty($maintenance)) { $maintenance->forceDelete(); } } }