I have Install a Package “Carbon” from the Tools->Composer Packages
nesbot/carbon 1.39.1And I try using the package -
$newdate = Carbon::createFromFormat(‘Y-m-d’, ‘1975-05-21’);But I got the error as
Fatal error: Class ‘PHPMaker2020\CashSMS_New_2020\Carbon’ not found in C:\wamp\www.…
Make sure you have generated the composer.json again and run composer update.
bui wrote:
$newdate = Carbon::createFromFormat(‘Y-m-d’, ‘1975-05-21’);Try this:
$newdate = \Carbon::createFromFormat(‘Y-m-d’, ‘1975-05-21’);
mobhar wrote:
Try this:
$newdate = \Carbon::createFromFormat(‘Y-m-d’, ‘1975-05-21’);Now I got the error as -
Fatal error: Class ‘Carbon’ not found in C:\wamp\www.…\classes\mytable_list.php on line 2548
Per previous reply:
Make sure you have generated the composer.json again and run composer update.