Answers for "how to insert current date in laravel 8"

PHP
0

laravel where created_at today

$posts = Post::whereDate('created_at', Carbon::today())->get();
Posted by: Guest on March-04-2021
1

get current date laravel

use Carbon\Carbon;
$date = Carbon::now();
//Get date and time
$date->toDateTimeString();
//Get date
$date->toDateString();
Posted by: Guest on December-04-2020

Code answers related to "how to insert current date in laravel 8"

Browse Popular Code Answers by Language