get data created at today laravel code example
Example 1: get current date laravel
use Carbon\Carbon;
$date = Carbon::now();
Example 2: laravel where created_at today
$posts = Post::whereDate('created_at', Carbon::today())->get();
use Carbon\Carbon;
$date = Carbon::now();
$posts = Post::whereDate('created_at', Carbon::today())->get();