2017 © Pedro Peláez
 

package larbon

Laravel 5 Larbon Package

image

mews/larbon

Laravel 5 Larbon Package

  • Friday, August 28, 2015
  • by mewebstudio
  • Repository
  • 0 Watchers
  • 1 Stars
  • 107 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 2 % Grown

The README.md

Laravel 5 Larbon Package

Based on Carbon, (*1)

The Larbon Service Provider can be installed via Composer by requiring the mews/larbon package and setting the minimum-stability to dev (required for Laravel 5) in your project's composer.json., (*2)

{
    "require": {
        "laravel/framework": "5.1.*",
        "mews/larbon": "~1.0"
    },
    "minimum-stability": "dev"
}

or, (*3)

Require this package with composer:, (*4)

composer require mews/larbon

Update your packages with composer update or install with composer install., (*5)

Usage

To use the Larbon Service Provider, you must register the provider when bootstrapping your Laravel application. There are essentially two ways to do this., (*6)

Find the providers key in config/app.php and register the Laravel Service Provider., (*7)

'providers' => [
    // ...
    Mews\Larbon\LarbonServiceProvider::class,
]

Find the aliases key in config/app.php., (*8)

'aliases' => [
    // ...
    'Larbon' => Mews\Larbon\Facades\Larbon::class,
]

Example Usage

Larbon::now()->format('l j F Y H:i:s');

// or

larbon()->format('l j F Y H:i:s');
$dtToronto = larbon()->createFromDate(2012, 1, 1, 'America/Toronto');
$dtVancouver = larbon()->createFromDate(2012, 1, 1, 'America/Vancouver');

echo $dtVancouver->diffInHours($dtToronto); // 3

Carbon Docs

http://carbon.nesbot.com/docs/, (*9)

^_^, (*10)

The Versions

28/08 2015

dev-master

9999999-dev https://github.com/mewebstudio/larbon

Laravel 5 Larbon Package

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel5 larbon laravel5 carbon service provider laravel5 date laravel5 datetime

28/08 2015

1.0.0

1.0.0.0 https://github.com/mewebstudio/larbon

Laravel 5 Larbon Package

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel5 larbon laravel5 carbon service provider laravel5 date laravel5 datetime