Inheritance: extends Illuminate\Foundation\Http\FormRequest
 public function postBillingAddress(AddressRequest $request)
 {
     $orderData = Session::get('order_data');
     $user = Auth::user();
     $request->merge(['user_id' => $user->id]);
     $request->merge(['type' => 'BILLING']);
     if ($request->get('id') > 0) {
         $address = Address::findorfail($request->get('id'));
         $address->update($request->all());
     } else {
         $address = Address::create($request->all());
     }
     $orderData['billing_address_id'] = $orderData['shipping_address_id'] = $address->id;
     Session::put('order_data', $orderData);
     return redirect()->route('checkout.step.shipping-option');
 }
 /**
  * Update the specified user addresses in database.
  *
  * @param \Illuminate\Http\Request $request
  * @param int                      $id
  *
  * @return \Illuminate\Http\Response
  */
 public function update(AddressRequest $request, $id)
 {
     $address = Address::findorfail($id);
     $address->update($request->all());
     return redirect()->route('my-account.address.index');
 }