Ejemplo n.º 1
0
 public function charge(Request $request)
 {
     $token = $request->input('token');
     $amount = $request->input('amount') * 100;
     $booking_id = $request->input('booking_id');
     $user = Auth::user();
     $user->charge($amount, ['source' => $token, 'receipt_email' => $user->email]);
     $bookings = Bookings::find($booking_id);
     $bookings->status = 'Booked';
     $bookings->save();
 }
Ejemplo n.º 2
0
 /**
  * Update the specified resource in storage.
  *
  * @param  Request  $request
  * @param  int  $id
  * @return Response
  */
 public function update(Request $request, $id)
 {
     $bookings = Bookings::find($id);
     $bookings->status = $request->input('status');
     $bookings->save();
 }