fluent query builder to sql statement

 avatar
decayingMind
php
2 years ago
448 B
4
Indexable
<?php

$items->where('status', 'approved_by_tm')->orWhere('status', 'approved_by_qam')
//select * from operations where status = 'approved_by_tm' or 'staus' = 'approved_by_qam' sql statement for above line

$items->where(function ($query) {
    $query->where('status', 'approved_by_tm')
        ->orWhere('status', 'approved_by_qam')
})
// select * from operation where stauts = ('approved_by_tm' or 'approved_by_qam') sql satement for above line