Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function getAllOrders($status = null)
- {
- $origin = auth()->user();
- $montages = Montage::where('origin_id', '=', $origin->id);
- if ($status) {
- $montages->where('status', '=', $status);
- }
- if (!$montages) {
- return response()->json([
- 'status' => 'success',
- 'data' => 'No Records Found'
- ]);
- }
- return response()->json([
- 'status' => 'success',
- 'data' => $montages
- ]);
- }
Add Comment
Please, Sign In to add comment