Ad Code

Responsive Advertisement

Ticker

6/recent/ticker-posts

Multiple where clause

 public function index() {

    $projects = Project::where(['status' => '1', 'not_completed' => '0', 'user_id' => '24'])->get();

  

    dd($projects);

}


public function index() {

    $projects = Project::where('status', '=', '1')

                         ->('not_completed', '!=', '1')

                         ->('user_id', '>=', '24')

                         ->get();

  

    dd($projects);

}


public function index() {

    $projects = Project::where([['status', '=', '1'], ['not_completed', '!=', '1'], ['user_id', '>=', '24']])->get();

  

    dd($projects);

}

Post a Comment

0 Comments

Ad Code

Responsive Advertisement