I want to use 'Where' to select "id" in some table which not in another table by WhereNotIn
public function showbydate($id)
{
$bookappoitm=DB::table('times')
->where('times.Dates_id','=',1)
->whereNOTIn('times.id',function($query){
$query->select('times_id')->from('bookappoitments')
->where('users_id',Auth::user()->id);
})
->get();
return view('admin.Booking.addappointment', compact('bookappoitm'));
}
Ho can I use $id
instead of number one '1'
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2I56ag4
via IFTTT
Aucun commentaire:
Enregistrer un commentaire