Sampling in two fields in Laravel?

I have a table with the following structure

Please tell me how to make the query below in the sample were all of the data, which for example sell_user_id = 1 and buy_user_id = 1, if sell_user_id = buy_user_id, I created two fields.
Now I'm doing using the method orWhere
$trades = $trades->where(function($query) use ($request) {
 $query->where('trades.sell_user_id', $request->user()->id)->orWhere('trades.buy_user_id', $request->user()->id);

but if sell_user_id = buy_user_id, then the result comes only one field.
June 3rd 19 at 19:33
0 answer

Find more questions by tags Laravel