voir le detail des commandes en attente

This commit is contained in:
Olivier Legat 2021-11-09 15:24:22 +01:00
parent 0f0f21fae9
commit 2a94a9c257

View file

@ -392,7 +392,12 @@ class CustomerController extends Controller
$order = Order::where('reference', '=', $reference)
->where('customer_id', Auth::guard('customer')->user()->id)
->firstOrFail();
$magasin = Magasin::find($order->timeslot->magasin->id);
if ($order->status_id == 1) {
$magasin = null;
} else {
$magasin = Magasin::find($order->timeslot->magasin->id);
}
return view('customer.order-detail', compact('order', 'magasin'));
}