Search
 
SCRIPT & CODE EXAMPLE
 

PHP

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 :: two column date compare in php 
Php :: material icons flutter list 
Php :: array join pgp 
Php :: php pdo 
Php :: Write a Multiplication program of two numbers in php using operator 
Php :: strpos php 
Php :: php curl detect 404 
Php :: Doctor Strange 
Php :: nested with laravel 
Php :: laravel 8 carbon if date is today 
Php :: php integer 
Php :: laravel set date format 
Php :: how to run a php file in xampp 
Php :: constants in php 
Php :: get all error message in array form laravel validation in laravel 
Php :: -store() laravel change name 
Php :: php globals 
Php :: set cookie on button click JavaScript 
Php :: codeigniter4 route optional parameter 
Php :: $_server php 
Php :: rollback to previous php version in linux 
Php :: file get content php post 
Php :: php prepared statements 
Php :: datatables 
Php :: laravel api 
Php :: get page templete 
Php :: get all taxonomy name wordpress 
Php :: Clear any previous error php 
Php :: macrotime phph 
Php :: check multiple roles with Blade directive @can? 
ADD CONTENT
Topic
Content
Source link
Name
1+9 =