Browse Source

get data from database

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

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

@@ -147,14 +147,9 @@ 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;
$staffFirst = Staff::where('_id', '5fb1e3b6a1f29b1e98558c69')->first();
$staff = Staff::where('api_token', $staffFirst->api_token );

return $staff;
}
}

Loading…
Cancel
Save