Ver código fonte

get-database

allo_data_retrieve^2
Siti Hajar Ibrahim 4 anos atrás
pai
commit
fa8823bfb4
1 arquivos alterados com 5 adições e 4 exclusões
  1. 5
    4
      app/Http/Controllers/Controller.php

+ 5
- 4
app/Http/Controllers/Controller.php Ver arquivo

@@ -154,11 +154,12 @@ class Controller extends BaseController
$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->staffdetail()->save();
$staff->save();

return $company . $staff;
$staffD = StaffDetail::where('_id',$staff->_id)->first();
$staffD->company_id = $company->_id;
$staffD->save();
return $company . $staff . $staffD;
}

public function adjustInstaller(Request $request){

Carregando…
Cancelar
Salvar