예제 #1
0
 public function show_sticker($id)
 {
     $delivery_history = DeliveryHistory::find($id);
     $input = unserialize($delivery_history->input);
     $quote = QuoteRequest::find($delivery_history->qr_id);
     $delivery_address = CustomerAddress::find($input['delivery_address']);
     // Create PDF
     $qtys = isset($input['number']) ? $input['number'] : '';
     $html = view('jobs.sticker', compact('input', 'quote', 'delivery_address', 'qtys'));
     $dompdf = PDF::loadHTML($html)->setPaper(array(0, 0, 422.37, 283.49));
     return $dompdf->stream();
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id, $job)
 {
     $customer_address = CustomerAddress::find($id);
     $customer = $customer_address->customer_name;
     return view('customer_addresses.edit', compact('customer', 'job', 'customer_address'));
 }