use Carbon\Carbon; echo Carbon::now();
$date = Carbon::now(); $newDate = $date->addDay(); echo $newDate;
$date = Carbon::now(); $formattedDate = $date->format('Y-m-d H:i:s'); echo $formattedDate;This will format the current date and time in the specified format and display it. Package/Library: Carbon is a package library for PHP. It provides a convenient and powerful way to work with time and dates. It is widely used in various PHP projects and has become a popular choice for developers.