GithubHelp home page GithubHelp logo

matriphe / format Goto Github PK

View Code? Open in Web Editor NEW
8.0 8.0 6.0 58 KB

Helpers contains common formatting, such as number, bytes, phone, simple hash slug, format duration, and remove new line in string. Very handy for formatting things in Laravel.

License: MIT License

PHP 100.00%

format's People

Contributors

matriphe avatar parsingeye avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

format's Issues

Localization

Library looks ok, but it is not usable for me, because output values are not localized. Maybe introduce localization support in further version of library?

Laravel upgrade to 5.4

Can't upgrade Laravel to 5.4
Call to undefined method Illuminate\Foundation\Application::share()
As of laravel 5.4 share has been removed. You will have to use the singleton instead.

Support currency

I think introducing currency formatting would be also useful. It would be great if it will support such configuration, for example:

 'PLN' => [
            'format'  => '{price} zł',
            'decimal' => ',',
            'thousand'=> ' '
        ],

Format bytes/numbers

Format::bytes uses Format::number to return a formatted string, but it doesn't accept the same number of parameters to format decimals and thousands separators. Since Format::number uses native php number_format(), it should follow the same default parameter signature for number_format - i.e. decimal (.) and thousands separator (,).

format number

how do i format

9762

to

9,762 ( Comma )

instead of

9.762 ( Dot )

because that's the way a Thousands should be formatted

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.