Procházet zdrojové kódy

get-database

allo_data_retrieve^2
Siti Hajar Ibrahim před 5 roky
rodič
revize
fa8823bfb4
1 změnil soubory, kde provedl 5 přidání a 4 odebrání
  1. 5
    4
      app/Http/Controllers/Controller.php

+ 5
- 4
app/Http/Controllers/Controller.php Zobrazit soubor

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

Načítá se…
Zrušit
Uložit