| @@ -718,7 +718,7 @@ class WorkOrderController extends Controller | |||
| $data = array(); | |||
| $wod = WorkOrder::where('wo',$request->wo)->first(); | |||
| $form = Form::where('_id',$wod->_id)->first(); | |||
| $installer = Staff::with('StaffDetail')->where('_id',$wod->installer_id)->first(); | |||
| $installer = Staff::with('StaffDetail')->where('_id',$wod->installer_id)->withTrashed()->first(); | |||
| $name = ''; | |||
| if (!empty($installer)){ | |||
| $name = $installer->StaffDetail->name; | |||
| @@ -121,11 +121,9 @@ class Controller extends BaseController | |||
| public function getDatabase(Request $request) | |||
| { | |||
| $claim = DealerClaim::where('activated_my', '11/2020')->get(); | |||
| $staff = Staff::all(); | |||
| $staff_detail = StaffDetail::all(); | |||
| foreach ($claim as $key => $c) { | |||
| # code... | |||
| $c->forceDelete(); | |||
| } | |||
| return $staff . $staff_detail; | |||
| } | |||
| } | |||