Browse Source

edit docket

hajar
Siti Hajar Ibrahim 5 years ago
parent
commit
52ca21d818
1 changed files with 9 additions and 3 deletions
  1. 9
    3
      app/Http/Controllers/Controller.php

+ 9
- 3
app/Http/Controllers/Controller.php View File



public function getDatabase(Request $request) public function getDatabase(Request $request)
{ {
$staff = Staff::where('api_token', null)->where('roles_access', 'Installer')->get();
return $staff;
$wo = WorkOrder::where('wo', $request->wo)->first();
$customer = Subscriber::where('_id', $wo->_id)->first();
$docket = Docket::where('work_order_id', $request->wo)->first();
$docket->installer_id = $wo->installer_id;
$docket->save();
$form = Form::where('_id', $wo->_id)->first();
$staff = StaffDetail::where('_id', $docket->installer_id)->first();

return $wo . $customer . $docket . $form . $staff;
} }
} }

Loading…
Cancel
Save