gjpbw/date-ago

Format date. DateAgo for Laravel.

v1.0 2019-03-18 21:23 UTC

This package is not auto-updated.

Last update: 2024-05-23 00:40:43 UTC


README

Installation

Require this package with composer.

composer require gjpbw/date-ago

Laravel <5.5 After updating composer, add the service provider to the providers array in config/app.php

Gjpbw\DateAgo\DateAgoServiceProvider::class,

Laravel >=5.5 uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.

Publishing

php artisan vendor:publish --provider="Gjpbw\DateAgo\DateAgoServiceProvider"

Using

dateAgo($date)

Result

demo