Search
 
SCRIPT & CODE EXAMPLE
 

PHP

laravel orWhere

$camps = $field->camps()->where('status', 0)->where(function ($q) {
    $q->where('sex', Auth::user()->sex)->orWhere('sex', 0);
})->get();
Comment

or where laravel

MyMode::where(['user_id' => 1])
            ->orWhere(['assigned_to' => 1])
            ->get();
Comment

laravel where

$users = DB::table('users')
                ->whereDate('created_at', '2016-12-31')
                ->get();
Comment

where in laravel

$users = Users::whereIn('id', array(1, 2, 3))->get()
Comment

where with and and or in a laravel

        $users = DB::table('user')->select('id', 'name', 'email','api_token','created_at')
                                  ->where('email' , $email)
                                  ->where('name' , $name)
                                  ->get();
Comment

laravel with and where

$projects = Project::whereHas('projectOffers', function ($offer) {
            $offer->where('teacher_id', "Ahmed");
            $offer->where('status_id', "Accepted");
        })->where('status_id', "inprogress")->get();
Comment

laravel where in

$users = DB::table('users')->whereIn('id', array(1, 2, 3))->get()
Comment

where clause in laravel

        $users = DB::table('user')->select('id', 'name', 'email','api_token','created_at')->where('email' , $email)->get();
        return response()->json($users);
Comment

laravel where and where

Table::where('Column', Value)->where('NewColumn', Value)->get();
Comment

laravel where

$users = DB::table('users')
                ->whereMonth('created_at', '12')
                ->get();
Comment

how to use or where in laravel

if (!empty($search)){
            $member = $member->where(function($q)use($search){$q->where('name', 'LIKE',  '%' . $search . '%')->orWhere('contact', 'LIKE',  '%' . $search . '%')->orWhere('contact02', 'LIKE',  '%' . $search . '%')->orWhere('email', 'LIKE',  '%' . $search . '%')->orWhere('blood_group', 'LIKE',  '%' . $search . '%'); });
  
        }
Comment

PREVIOUS NEXT
Code Example
Php :: php array_filter 
Php :: unlink is a directory laravel 
Php :: redirect compact laravel 
Php :: php get looping month 
Php :: laravel get single column value 
Php :: custom 404 page in laravel 
Php :: convert single quote in htmlentities php 
Php :: php check for null 
Php :: ACF Photo Gallery Output 
Php :: laravel slug 
Php :: laravel validation unique two columns 
Php :: laravel composite unique key 
Php :: validation in laravel 
Php :: delete multiple row by model in laravel 
Php :: installing php on ubuntu 
Php :: call model function in controller laravel 
Php :: delete route method in laravel 
Php :: magento 1.9 print blank page error 
Php :: remove element from xml on php 
Php :: get class name from object php 
Php :: users not having any role laravel spatie 
Php :: wp shortcode 
Php :: laravel project create with version 
Php :: Merge Two Array ( Laravel ) 
Php :: laravel find many 
Php :: Get the post category if you have a custom post_type 
Php :: php read sql 
Php :: str_replace smarty template 
Php :: laravel select max value 
Php :: wordpress Warning: Cannot modify header information - headers already sent by 
ADD CONTENT
Topic
Content
Source link
Name
6+5 =