added rate to booking table

This commit is contained in:
Jack Goh
2018-06-20 22:54:31 +08:00
parent a30fd2a0b1
commit 385372e3dd
5 changed files with 56 additions and 19 deletions
+4 -1
View File
@@ -17,7 +17,10 @@ class BookingController extends Controller
{
public function index(){
$booking = Booking::where('user_id',Auth::user()->id)->get();
$booking = Booking::select('bookings.id', 'rates.bookings.term')
->leftJoin('rates', 'bookings.rate_id', '=', 'rates.id')
->where('user_id',Auth::user()->id)
->get();
return $booking;
}