Class Carbon\Carbon not found

后端 未结 8 1297
无人及你
无人及你 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:50

    You this class in controller of Laravel.

    use Carbon\Carbon;
    

    then you simply define the carbon command for print the current date

    $date = Carbon::now(); 
    

提交回复
热议问题