Check out the Query Builder docs
https://laravel.com/docs/5.4/queries
Some untested code below
$users = DB::table('users')
->where('type', 'affiliate')
->whereIn('status', ['unpaid', 'partial_paid'])
->whereRaw('YEAR(`created_date`) = :year AND MONTH(`created_date`) = :month', ['year' => 2017, 'month' => 3])
->get();
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community