Answers for "laravel get today data"

PHP
6

get current date laravel

use Carbon\Carbon;
$date = Carbon::now();
Posted by: Guest on June-08-2020
1

where('created_at', '=', date('Y-m-d'));

$q->whereDay('created_at', '=', date('d'));
$q->whereMonth('created_at', '=', date('m'));
$q->whereYear('created_at', '=', date('Y'));
Posted by: Guest on July-11-2020
0

where('created_at', '=', date('Y-m-d'));

$q->whereDate('created_at', '=', date('Y-m-d'));
Posted by: Guest on July-11-2020

Browse Popular Code Answers by Language