Download the PHP package matriphe/format without Composer

On this page you can find all versions of the php package matriphe/format. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package format

Format

Build Status Latest Stable Version Total Downloads License

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

Under the hood, it wraps some other great packages.

Compatibility

This latest 2.0 version works with Laravel >= 5.5. For previous version, check 1.6 version.

It requires PHP >= 7.0 and and bcmath extension.

Installation

Open composer.json and require this line below.

Or you can run this command from your project directory.

It used Laravel auto package discovery feature.

Usage

It's really easy to use the functions, by calling the Format facade or simply using global functions helpers.

It use internal locale, if you want to change the locale at runtime, just pass a $locale in the function.

On this example, we use Indonesia (id) locale as default.

Format Number

Format Currency

Format Bytes

Format to Bytes

Format Phone

Format Phone Human

Format Phone Carrier

Format DateRange

Format Hashed Slug

It's very useful to generate hashed URL slug like in URL shortener service. It use UNIX timestamp salt to generate unique ID. You can also set the length and the alphabet for the output.

Note for hashed slug

If you want to save this hashed slug into MySQL, make sure the column is case sensitive. To do this, alter the column with this command.

Format Duration

It's very useful to generate duration in days, hours, minutes, and seconds.

Remove New Line in String

Will remove \n, \r, and spaces in string to make it in one line.


All versions of format with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
gabrielelana/byte-units Version ^0.5.0
hashids/hashids Version ^2.0
propaganistas/laravel-intl Version ^2.0
propaganistas/laravel-phone Version ^4.0
sokil/php-isocodes Version ^2.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package matriphe/format contains the following files

Loading the files please wait ....