Laravel 5雄辩与AND OR和?

How could I say something like this WHERE (a=1 and b>1) or (c=1 and d>1)?

This is my code:

$playerMatches = Match::where(function ($query) use($id) {
                                $query->where('player_1_id', '=', $id)
                                    ->where('result_1', '>', 'result_2');
                                })
                            ->orWhere(function ($query) use($id) {
                                $query->where('player_2_id', '=', $id)
                                    ->where('result_2', '>', 'result_1');
                            })->get();

Thanks in advance!

$playerMatches = 
Match::where([['player_1_id', '=', $id],['result_1', '>', 'result_2']])
->orWhere([['player_2_id', '=', $id],['result_2', '>', 'result_1']])
->get();
if ( ! function_exists('sql_dump')) {
function sql_dump($connection = null)
{
    DB::connection($connection)->enableQueryLog();
    DB::listen(function ($sql) {
        $i = 0;
        $bindings = $sql->bindings;
        $rawSql = preg_replace_callback('/\?/', function ($matches) use ($bindings, &$i) {
            $item = isset($bindings[$i]) ? $bindings[$i] : $matches[0];
            $i++;
            if ($item instanceof DateTime) {
                $item = $item->format('Y-m-d H:i:s');
            }
            return gettype($item) == 'string' ? "'$item'" : $item;
        }, $sql->sql);
        echo $sql->time . '#' . $rawSql, "
<br /><br />
";
    });
}
}

Call sql_dump before your query. You will see the sql in the response.

sql_dump();