Browse Source

get database

allo_data_retrieve^2
Siti Hajar Ibrahim 4 years ago
parent
commit
7843501562

+ 2
- 2
app/Http/Controllers/Controller.php View File

return $work_order . $staff; return $work_order . $staff;
} }


public function adjustInstaller(){
$wo = WorkOrder::where('installer_id', '5f606ed1a1f29b50e429a422')->where('status', 'like', '%Pending%')->get();
public function adjustInstaller(Request $request){
$wo = WorkOrder::where('installer_id', $request->id)->where('status', 'like', '%Pending%')->get();
foreach ($wo as $w) { foreach ($wo as $w) {
$w->status = "Pending Contractor"; $w->status = "Pending Contractor";
$w->installer_id = ""; $w->installer_id = "";

+ 1
- 1
app/Http/Controllers/CustomerService/WorkOrderController.php View File

$product = Product::where('speed', $form->PackageDetail->name)->where('formT', $w->Form->type_application)->first(); $product = Product::where('speed', $form->PackageDetail->name)->where('formT', $w->Form->type_application)->first();
$company = Company::where('_id', $w->contractor_id)->first(); $company = Company::where('_id', $w->contractor_id)->first();


// info($w->installer_id);
info($w->installer_id);
if ($w->installer_id != '') { if ($w->installer_id != '') {
$installer = Staff::with('StaffDetail')->where('_id', $w->installer_id)->first(); $installer = Staff::with('StaffDetail')->where('_id', $w->installer_id)->first();
$installer = $installer->StaffDetail->name; $installer = $installer->StaffDetail->name;

Loading…
Cancel
Save