Might be stupid question, how to correctly state the ID in select statement?
public function generatefinalconfirmation($id) {
$booking = Booking::findOrFail($id);
$flightin = DB::select('SELECT b.bookingname, f.origin FROM Bookings B JOIN Flights F ON B.Flightin = F.FlightId WHERE B.ID = id');
}
That code give me all the data while where b.id = $id
give me an error message.
Thanks
Edit: Thanks all for the answers, sorry for all the rookie mistake