Przeglądaj źródła

undo flag add withTrashed()

ifah
Siti Hajar Ibrahim 4 lat temu
rodzic
commit
e6832e9cee

+ 2
- 3
app/Http/Controllers/Contractor/WorkOrderController.php Wyświetl plik

@@ -237,7 +237,6 @@ class WorkOrderController extends Controller

}

info('contractor242' . $w->installer_id . $w->wo);
if($w->installer_id != ''){
$installer = Staff::with('StaffDetail')->where('_id',$w->installer_id)->withTrashed()->first();
$installer = $installer->StaffDetail->name;
@@ -323,7 +322,7 @@ class WorkOrderController extends Controller
$company = Company::where('_id',$w->contractor_id)->first();

if($w->installer_id != ''){
$installer = Staff::with('StaffDetail')->where('_id',$w->installer_id)->first();
$installer = Staff::with('StaffDetail')->where('_id',$w->installer_id)->withTrashed()->first();
if(!empty($installer)){
$installer = $installer->StaffDetail->name;
}
@@ -437,7 +436,7 @@ class WorkOrderController extends Controller
$company = Company::where('_id',$w->contractor_id)->first();

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

+ 3
- 5
app/Http/Controllers/CustomerService/WorkOrderController.php Wyświetl plik

@@ -277,7 +277,6 @@ class WorkOrderController extends Controller
$product = Product::where('speed',$form->PackageDetail->name)->where('formT',$w->Form->type_application)->first();
$company = Company::where('_id',$w->contractor_id)->first();

info('cs282 ' . $w->installer_id . $w->wo);
if($w->installer_id != ''){
$installer = Staff::with('StaffDetail')->where('_id',$w->installer_id)->withTrashed()->first();
$installer = $installer->StaffDetail->name;
@@ -388,7 +387,7 @@ class WorkOrderController extends Controller
$company = Company::where('_id',$w->contractor_id)->first();

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

@@ -495,7 +494,6 @@ class WorkOrderController extends Controller
$product = Product::where('speed',$form->PackageDetail->name)->where('formT',$w->Form->type_application)->first();
$company = Company::where('_id',$w->contractor_id)->first();

info('cs499 ' . $w->installer_id . $w->wo);
if($w->installer_id != ''){
$installer = Staff::with('StaffDetail')->where('_id',$w->installer_id)->withTrashed()->first();
$installer = $installer->StaffDetail->name;
@@ -605,7 +603,7 @@ class WorkOrderController extends Controller
$company = Company::where('_id',$w->contractor_id)->first();

if($w->installer_id != ''){
$installer = Staff::with('StaffDetail')->where('_id',$w->installer_id)->first();
$installer = Staff::with('StaffDetail')->where('_id',$w->installer_id)->withTrashed()->first();
if(!empty($installer)){
$installer = $installer->StaffDetail->name;
}
@@ -716,7 +714,7 @@ class WorkOrderController extends Controller
$company = Company::where('_id',$w->contractor_id)->first();

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


Ładowanie…
Anuluj
Zapisz