Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class OrderController extends Controller
- {
- /**
- * Display a listing of the resource.
- *
- * @return \Illuminate\Http\Response
- */
- /**
- * Display a listing of the resource.
- *
- * @return \Illuminate\Http\Response
- */
- public function list(Request $request, $status = null)
- {
- $dt = new OrderDataTable($status, $request->user());
- if (!is_null($status)){
- if(in_array($status, ['attention', 'warning'])) {
- $displayStatus = ucfirst($status);
- }
- else {
- $st = Status::where('id', $status)->first();
- if (is_null($st)) {
- abort(404);
- }
- $displayStatus = $st->status;
- }
- return $dt->render('dashboard.order.index', [
- 'status' => $displayStatus,
- ]);
- }
- return $dt->render('dashboard.order.index');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment