supplierRepository = $supplierRepository; $this->productRepository = $productRepository; $this->customerRepository = $customerRepository; } /** * Display a listing of the resource. */ public function index() { $data['title'] = 'Order List'; $data['orders'] = []; return view('order::order.index', $data); } /** * Show the form for creating a new resource. */ public function create() { $data['title'] = 'Create Order'; $data['productList'] = $this->productRepository->pluck(); $data['supplierList'] = $this->supplierRepository->pluck(); $data['customerList'] = $this->customerRepository->pluck(); return view('order::order.create', $data); } /** * Store a newly created resource in storage. */ public function store(Request $request): RedirectResponse { // } /** * Show the specified resource. */ public function show($id) { return view('order::order.show'); } /** * Show the form for editing the specified resource. */ public function edit($id) { return view('order::order.edit'); } /** * Update the specified resource in storage. */ public function update(Request $request, $id): RedirectResponse { // } /** * Remove the specified resource from storage. */ public function destroy($id) { // } public function cloneProduct(Request $request) { $data = []; $numInc = $request->numberInc; $script = true; $productList= $this->productRepository->pluck(); return response()->json([ 'view' => view('order::order.clone-product', compact('data', 'numInc', 'script', 'productList'))->render(), ]); } }