Guest User

Untitled

a guest
Mar 24th, 2018
631
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. public function getAllOrders($status = null)
  2. {
  3. $origin = auth()->user();
  4. $montages = Montage::where('origin_id', '=', $origin->id);
  5. if ($status) {
  6. $montages->where('status', '=', $status);
  7. }
  8. if (!$montages) {
  9. return response()->json([
  10. 'status' => 'success',
  11. 'data' => 'No Records Found'
  12. ]);
  13. }
  14. return response()->json([
  15. 'status' => 'success',
  16. 'data' => $montages
  17. ]);
  18. }
Add Comment
Please, Sign In to add comment