I get some values from the database and I passed those values into view from the controller. now I want to use that data with some carbon function
in Laravel view.
In my View file I wrote
foreach($customer as $time){
$create= $time->created_at;
$update= $time->updated_at;
$create_at_difference=\Carbon\Carbon::createFromTimestamp(strtotime($create))->diff(\Carbon\Carbon::now())->days;
}
when I try like this it returns "Class 'Carbon' not found"
How can I do this?