Example #1
0
 /**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function update(ShippingRequest $request, $id)
 {
     $shipping = $this->shipping->update($request->all());
     return redirect('admin/shipping')->with(array('status' => 'success', 'message' => 'Le frais de port a été mis à jour'));
 }
Example #2
0
 public function postShipping(ShippingRequest $request)
 {
     $input = $request->all();
     $user = User::find($input['user_id']);
     $order = Session::get('order');
     $order['user'] = $request->except('_token', 'payment_id');
     Session::put(['order' => $order]);
     if ($user->update($input)) {
         return response()->json(['success' => TRUE]);
     }
 }