-3
`update `table` set is_available = 0 where id_restaurant = 303 (and weekday = ? or id = ? )`
$weekday = $request->input('weekday', '');
$table = $request->input("id", '');
//Query em construção
DB::table('table')
->where('id_restaurant', $this->restaurantId)
->update(['is_available' => 0]);
parameters between parentheses are optional, when weekday and id parameters do not exist I want to update the Where table id_restaurant equals 303 how to build this query in Laravel ?
What you tried so far?
– gmsantos
I edited the question.
– Daywison Ferreira Leal
@gmsantos, you can take a look?
– Daywison Ferreira Leal