Преглед изворни кода

get-database

allo_data_retrieve^2
Siti Hajar Ibrahim пре 4 година
родитељ
комит
fa8823bfb4
1 измењених фајлова са 5 додато и 4 уклоњено
  1. 5
    4
      app/Http/Controllers/Controller.php

+ 5
- 4
app/Http/Controllers/Controller.php Прегледај датотеку

@@ -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){

Loading…
Откажи
Сачувај