how to write this condition using laravel eloquent
SQL
select count(id) from fight where status = 'finished' and (user1 = 1 or user2 = 1)
Laravel (not finished):
Fight::where('user1','=',$uid)->orWhere('user2', '=', $uid)->count('id');
thanks,
This should do the work:
EDIT
Answering comment: