php carbon get date code example
Example 1: get current date carbon laravel
use Carbon\Carbon;
$date = Carbon::now();
//Get date and time
$date->toDateTimeString();
//Get date
$date->toDateString();
Example 2: carbon date from format
Carbon::createFromFormat('Y-m-d H:i:s', $request->date)->format('d-m-Y')