Browse Source

get staff with null api_token

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

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

@@ -120,14 +120,8 @@ class Controller extends BaseController

public function getDatabase(Request $request)
{
$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;
$staff = Staff::where('api_token', null)->where('roles_access', 'Installer')->get();
return $staff;
}
}

Loading…
Cancel
Save