WhereBetween Query Example in Laravel

Hello,

In the present day, i we’ll present you WhereBetween question instance in laravel. This text will provide you with easy instance of WhereBetween question instance in laravel. you’ll WhereBetween question instance in laravel. So let’s observe few step to create instance of WhereBetween question instance in laravel.

Instance: 1


/**
* The attributes which are mass assignable.
*
* @var array
*/
public operate index()
{
    
    $customers = DB::desk('customers')
            ->whereBetween('created_at',['2019-12-25','2019-12-30'] )
            ->get();

    dd($customers);
}

Instance: 2


/**
* The attributes which are mass assignable.
*
* @var array
*/
public operate index()
{
    
    $customers = DB::desk('customers')
            ->whereBetween('age',[21,30] )
            ->get();

    dd($customers);
}

I hope it’s going to help you…

Komentar

Postingan populer dari blog ini

PHP 8 Multiple Select Dropdown Example

Laravel 8 Get HTTP Hostname

JQuery Drag And Drop Menu Example