order list update
This commit is contained in:
@@ -59,10 +59,20 @@ class AdminOrderController extends Controller
|
||||
return redirect()->back()->with('success', 'Order created successfully with ID: ' . $newOrderId);
|
||||
}
|
||||
|
||||
|
||||
public function show($id)
|
||||
{
|
||||
$order = Order::findOrFail($id);
|
||||
return view('admin.orders_show', compact('order'));
|
||||
$order = Order::with('markList')->findOrFail($id);
|
||||
|
||||
// Get the mark list associated with this order
|
||||
$markList = $order->markList;
|
||||
|
||||
// Fetch the user using the customer_id from mark list
|
||||
$user = null;
|
||||
if ($markList && $markList->customer_id) {
|
||||
$user = \App\Models\User::where('customer_id', $markList->customer_id)->first();
|
||||
}
|
||||
|
||||
return view('admin.orders_show', compact('order', 'markList', 'user'));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user