<?php
namespace AppHttpControllers;
use IlluminateHttpRequest;
use CarbonCarbon;
class DateController extends Controller
{
public function index()
{
$currentDateTime = Carbon::now();
$newDateTime = Carbon::now()->addYear();
print_r($currentDateTime);
print_r($newDateTime);
}
}
use CarbonCarbon;
// laravel time
{{ CarbonCarbon::parse($item->created_at)->diffForHumans() }}