Search
 
SCRIPT & CODE EXAMPLE
 

PHP

or where laravel

MyMode::where(['user_id' => 1])
            ->orWhere(['assigned_to' => 1])
            ->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 and where

Table::where('Column', Value)->where('NewColumn', Value)->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 :: if exists in string php 
Php :: add json extenstion php 
Php :: grouping routes based on controller 
Php :: jQuery is not defined load-scripts.php 
Php :: currency format in laravel 
Php :: laravel pagination problem in blade 
Php :: laravel resource set status code 
Php :: macos how host laravel website on localhost and intranet wifi 
Php :: laravel drop table migration 
Php :: php .= 
Php :: connect sql server php 
Php :: php-fpm docker 
Php :: php write to standard out 
Php :: php typeof 
Php :: if acf exists 
Php :: php check if checkbox isset 
Php :: php regular expression function 
Php :: Stored Procedures in Laravel 
Php :: php array insert before key 
Php :: operators in php 
Php :: php mail in localhost wamp 
Php :: carbon between hours 
Php :: laravel migrations rename table 
Php :: foreign key in laravel 9 
Php :: php remove element from array by value 
Php :: run codeigniter 4 with spark 
Php :: php define class 
Php :: laravel all fillable 
Php :: php pdo sql server connect 
Php :: how to redirect to another page in php after submit 
ADD CONTENT
Topic
Content
Source link
Name
7+8 =