I have a table : Profile Table has one foreign key and primary key. I want to update row based on two condition . Like : where ( id == 1 and user == 'admin')
How to use two para meter in update query using eloquent.
you can do this by make the following:
ModelName::where(['id'=>1,'user'=>'admin'])
->update(['column_name'=>'value',.....]);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With