| public function getDatabase(Request $request) | public function getDatabase(Request $request) | ||||
| { | { | ||||
| $company = Company::all(); | |||||
| return $company; | |||||
| $company = Company::where('name', 'Innomapps Sdn Bhd')->first(); | |||||
| $staff = Staff::where('email','dealer@test.my')->first(); | $staff = Staff::where('email','dealer@test.my')->first(); | ||||
| $staff->company_id = $company->_id; | |||||
| $staff->company_id = "5bb2bc66ee0dc2271c6fedf6"; | |||||
| $staff->save(); | $staff->save(); | ||||
| $details = StaffDetail::where('_id',$staff->_id)->first(); | $details = StaffDetail::where('_id',$staff->_id)->first(); | ||||
| $details->company_id = $company->_id; | |||||
| $details->company_id = "5bb2bc66ee0dc2271c6fedf6"; | |||||
| $details->save(); | $details->save(); | ||||
| } | } | ||||
| } | } |