I have a query created with QueryBuilder, it is a update
and what I want is for a field to only reduce by 1.
DB::table('Medicos')
->where('ID','=',$request->medico)
->update(['fichas'=>'fichas-1']);
I don't know if I'm explaining myself... it's something like that. Otherwise, you would have to make a query to know how many you have, subtract it in the logic and then modify the data in the database.
you can do it like this
DB:raw() :
increment() :