浏览代码

get-database

allo_data_retrieve^2
父节点
当前提交
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){

正在加载...
取消
保存