Search
 
SCRIPT & CODE EXAMPLE
 

PHP

laravel where multiple conditions

$query->where([
    ['column_1', '=', 'value_1'],
    ['column_2', '<>', 'value_2'],
    [COLUMN, OPERATOR, VALUE],
    ...
])
Comment

multiple logical condition in laravel query

// ...
$q->where(function ($query) {
    $query->where('gender', 'Male')
        ->where('age', '>=', 18);
})->orWhere(function($query) {
    $query->where('gender', 'Female')
        ->where('age', '>=', 65);	
})
Comment

two condition in one laravel query

 $data = Sub_sub_category::select('sub_sub_cat_name','id')->where('sub_cat_id',$request->id)->where('status','1')->get();
Comment

PREVIOUS NEXT
Code Example
Php :: laravel assets path 
Php :: laravel create new request 
Php :: codeigniter 4 limit query 
Php :: laravel check if request has value 
Php :: php echo sql result 
Php :: php www to non www redirect 
Php :: the uploaded file exceeds the upload_max_filesize in laravel 
Php :: laravel set config 
Php :: codeigniter 4 redirect with data 
Php :: laravel append 
Php :: get page thumbnail id wordpress 
Php :: php string to uppercase 
Php :: laravel query builder get data as array of array 
Php :: every wordpress page redirect to localhost ? 
Php :: autogenerate slug for model laravel 
Php :: laravel spatie asigne role 
Php :: php time 
Php :: get numbers from string php 
Php :: if condition in smarty 
Php :: contains php 
Php :: enum artisan codwe 
Php :: update session laravel 
Php :: get next month first day php 
Php :: or where in codeigniter 
Php :: Redirect to external domain in Laravel 
Php :: add execute time php 
Php :: laravel create mode 
Php :: laravel log 
Php :: transient wordpress 
Php :: wp get attachment id 
ADD CONTENT
Topic
Content
Source link
Name
9+4 =