multiple where condition in laravel

Laravel Multiple Where Condition Example

syntax

->where('COLUMN_NAME', 'OPERATOR', 'VALUE')
->where('COLUMN_NAME', 'OPERATOR', 'VALUE')

->where([
        ['COLUMN_NAME', 'OPERATOR', 'VALUE'],
        ['COLUMN_NAME', 'OPERATOR', 'VALUE']
    ]);

SQL Query:

SELECT * FROM `members` WHERE status = 1 AND app_flag = 0

Examople 1:

public function index()
{
    $members = Member::select('*')
                ->where('status', '=', 1)
                ->where('app_flag', '=', 0)
                ->get();
   
    dd($members);
}

Example 2:

public function index()
{
    $members = Member::select('*')
                ->where([
                    ['status', '=', 1],
                    ['app_flag', '=', 0]
                ])
                ->get();
   
    dd($members);
}