Created
March 15, 2018 17:23
-
-
Save brunokunace/43dda2112ad70f559e2c77f4bed1fcec to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | |
| ]); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment