2017 © Pedro Peláez
 

library intl-carbon

Laravel 5 Package Template

image

easteregg/intl-carbon

Laravel 5 Package Template

  • Sunday, August 27, 2017
  • by easteregg
  • Repository
  • 1 Watchers
  • 0 Stars
  • 407 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 4 % Grown

The README.md

Build Status, (*1)

Persian date formatter using php-intl integration into Laravel

This package provides a convenient way to localize and format Eloquent date attributes. using this package, you can localize date attributes of any model to any calendar you want. it looks for the current application locale to generate string., (*2)

Installation

  1. run composer require easteregg/intl-carbon
  2. add Easteregg\IntlCarbon\IntlServiceProvider to config/app.php providers.
  3. run php artisan vendor:publish --tag="intl-carbon.config" to publish the config files. (optional)

Usage

Edit the config file and select a calendar for each locale your application might be having, (*3)

see: (https://secure.php.net/manual/en/class.intldateformatter.php), (*4)

For more information about the formatting, checkout this page. Edit your eloquent model and add Easteregg\IntlCarbon\LocalizesDates trait., (*5)

example:, (*6)

```$xslt <?php, (*7)

use Easteregg\IntlCarbon\LocalizesDates;, (*8)

class Post extends Model { use LocalizesDates; }, (*9)

```, (*10)

You should be good to go. now anywhere in the system, you can call any model date value with a new long() method to format. (e.g. `$post->created_at->long()). Pull requests are welcome for this repository., (*11)

#

The Versions

27/08 2017

dev-master

9999999-dev

Laravel 5 Package Template

  Sources   Download

proprietary

The Requires

 

The Development Requires

by Mohammadreza Ghorbani

27/08 2017

0.2.0

0.2.0.0

Laravel 5 Package Template

  Sources   Download

proprietary

The Requires

 

The Development Requires

by Mohammadreza Ghorbani

04/02 2017

v0.1

0.1.0.0

Laravel 5 Package Template

  Sources   Download

proprietary

The Requires

 

The Development Requires

by Mohammadreza Ghorbani