update confirmation and transfer page

- update booking controller
This commit is contained in:
Mohd Arief
2018-06-28 15:40:27 +08:00
parent fd5883c747
commit 651f762237
5 changed files with 415 additions and 94 deletions
+8 -2
View File
@@ -130,6 +130,12 @@ class BookingController extends Controller
public function show($id)
{
$booking = Booking::where('user_id',Auth::user()->id)->where('id', $id)->first();
// just added to try
$user_bankslip = $booking->userBankSlip()->first();
if ($user_bankslip){
$booking->user_bankslip_path = Storage::url($user_bankslip->bankslip_path);
}
if($booking){
$date1 = new DateTime($booking->created_at);
@@ -143,8 +149,8 @@ class BookingController extends Controller
}
return $booking;
}
}
}
public function adminShow($id)
{
$booking = Booking::where('id', $id)->first();