Answers for "current data laravel 8 carbon"

PHP
1

get current date carbon laravel

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

laravel where creation is today carbon

$posts = Post::whereDate('created_at', Carbon::today())->get();
Posted by: Guest on September-14-2020

Code answers related to "current data laravel 8 carbon"

Browse Popular Code Answers by Language