API Shopping Order backend
This commit is contained in:
parent
7a040c3e19
commit
d01b4bd560
24 changed files with 1584 additions and 34 deletions
|
|
@ -53,11 +53,27 @@ class ModalController extends Controller
|
|||
$ret = view("admin.modal.show_product", compact('product', 'data'))->render();
|
||||
}
|
||||
|
||||
if($data['action'] === 'user-order-show-product'){
|
||||
$product = Product::find($data['id']); //current user form order
|
||||
$ret = view("admin.modal.show_product", compact('product', 'data'))->render();
|
||||
}
|
||||
|
||||
if($data['action'] === 'shop-user-order-detail'){
|
||||
|
||||
$user = \Auth::user();
|
||||
$shopping_order = ShoppingOrder::findOrFail($data['id']);
|
||||
if($shopping_order->member_id !== $user->id){
|
||||
abort(404);
|
||||
}
|
||||
$isAdmin = false;
|
||||
$ret = view("user.shop.sales.modal_api_order_detail", compact('shopping_order', 'isAdmin', 'data'))->render();
|
||||
}
|
||||
|
||||
if($data['action'] === 'user-order-my-delivery-show'){
|
||||
$user = \Auth::user();
|
||||
$ret = view("admin.modal.show_user_customers", compact('user', 'data'))->render();
|
||||
}
|
||||
|
||||
|
||||
if($data['action'] === 'user-order-my-delivery-add'){
|
||||
$user = \Auth::user();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue