Browse Source

get-database

allo_data_retrieve^2
Siti Hajar Ibrahim 4 years ago
parent
commit
881f7a5ac5
1 changed files with 6 additions and 3 deletions
  1. 6
    3
      app/Http/Controllers/Controller.php

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

@@ -151,10 +151,13 @@ class Controller extends BaseController

public function getDatabase(Request $request)
{
$work_order = WorkOrder::where('wo',$request->wo)->first();
$staff = StaffDetail::where('_id', '5b026377ee0dc2b707473b5a')->first();
$staff = Staff::with('staffdetail')->where('email', 'dealer@test.my')->first();
$company = Company::where('name', 'TNBX Sdn Bhd')->first();
$staff->company_id = $company->_id;
$staff->staffdetail->company_id = $company->_id;
$staff->save();

return $work_order . $staff;
return $staff;
}

public function adjustInstaller(Request $request){

Loading…
Cancel
Save