Browse Source

get-database

master
Siti Hajar Ibrahim 5 years ago
parent
commit
632cbb17e7
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      app/Http/Controllers/Controller.php

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

public function getDatabase(Request $request) public function getDatabase(Request $request)
{ {
$subscriber = Subscriber::where('name',$request->name)->first(); $subscriber = Subscriber::where('name',$request->name)->first();
$form = Form::where('_id',$subscriber->_id)->withTrashed()->first();
$work_order = WorkOrder::where('_id',$subscriber->_id)->withTrashed()->first();
// $form = Form::where('_id',$subscriber->_id)->withTrashed()->first();
// $work_order = WorkOrder::where('_id',$subscriber->_id)->withTrashed()->first();


$formHistory = FormStatus::where('form_id',$subscriber->_id)->get(); $formHistory = FormStatus::where('form_id',$subscriber->_id)->get();


return $form . $work_order . $formHistory;
return $formHistory;
} }
} }

Loading…
Cancel
Save