Fresh code drop

Keep OR branches grouped

PHP

Original CodeSnap example inspired by Laravel News. Source: https://laravel-news.com/eloquent-tips-tricks

PHP
CodeSnap // free canvas

Keep OR branches grouped

<?php

$matches = Record::query()
    ->where('tenant_id', $tenantId)
    ->where(fn ($q) => $q
        ->where('status', 'ready')
        ->orWhere('priority', 'high'))
    ->get();

// Further reading: https://laravel-news.com/eloquent-tips-tricks

Turn your code into a post.Five templates are free—no account needed.

Remix this snap