April 2015
Beginner
144 pages
3h 13m
English
Laravel bundles Carbon (https://github.com/briannesbitt/Carbon), which extends and augments PHP's native DateTime object with more expressive methods. Laravel uses it mainly to provide more expressive methods on the date and time properties (created_at, updated_at, and deleted_at) of an Eloquent object. However, since the library is already there, it would be a shame not to use it elsewhere in the code of your application.
Carbon objects are meant to be instantiated like normal DateTime objects. They do, however, support a handful of more expressive methods:
$now ...Read now
Unlock full access