Class Carbon\Carbon not found

后端 未结 8 1336
无人及你
无人及你 2020-12-24 12:17

I recently added a package to my Laravel 4 site and now anything that uses Eloquent (or at least Eloquent with any reference to date/time) is showing a 500 error that states

8条回答
  •  滥情空心
    2020-12-24 12:28

    Some times specifying prefer-dist prefixed by “--” (aka “bare double dash”) at the end or suffixing at the end of create-project also matters while installing...

    The below command was working fine in laravel 5.5 without getting an error

    composer create-project laravel/laravel blog  "5.5.*" --prefer-dist
    

    But when I was about to begin installing Laravel 5.6 with this below command

    composer create-project laravel/laravel blog --prefer-dist
    

    I used to get

    Whoops\Exception\ErrorException : Class 'Carbon\Carbon' not found

    After referring to the official Installation Documentation

    composer create-project --prefer-dist laravel/laravel blog
    

    After executing the above command there were no exceptions raised, therefore installation succeeded, thereby generating a base64 hash key

提交回复
热议问题