get current date data in laravel code example
Example 1: get current date laravel
use Carbon\Carbon;
$date = Carbon::now();
Example 2: where('created_at', '=', date('Y-m-d'));
$q->whereDate('created_at', '=', date('Y-m-d'));
Example 3: where('created_at', '=', date('Y-m-d'));
$q->where(DB::raw("DATE(created_at) = '".date('Y-m-d')."'"));