Download the PHP package garanaw/laravel-numeral without Composer

On this page you can find all versions of the php package garanaw/laravel-numeral. 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 laravel-numeral

laravel-numeral


What is it?

This package inlines the Number helper with the Str helper. It does so by adding some functionality as well as introducing a number of tools:

Garanaw\LaravelNumeral\Support\Numeral

This class is the one that should align with the existing Stringable. This wrapper allows chaining operations on numbers. Most of the native operations from PHP have been added, along with other helper functions. Some basic equations like fractals have been also added to this.

It uses the same traits than its sibling Stringable, however it's lacking some interfaces (JsonSerializable, ArrayAccess) as those don't apply to this scalar. PHP's \Stringable (not to be confused with Illuminate\Support\Stringable) is implemented in order to cast the value to a string and allow visual representation in Blade (this is done with the existing Number's method format().

The decision of using this name instead of Numerable to fully align it with Stringable is due to the definition provided by Oxford's dictionary for the word "numeral": able to be counted

The class supports integers and floats.

Garanaw\LaravelNumeral\Support\Number

New functionality has been added to this helper. Not everything that appears in Numeral has been doubled here, because simple operations such as additions would imply more cumbersomeness when used here rather than just doing 1 + 1.

However, a new random() method has been introduced here as a wrapper for PHP's Random\Randomizer(). This functionality doesn't exist in the stateful class

num()

To mimic the str() helper, a new num() helper has been introduced with similar functionality. This helper will return a Numeral object with the value passed as a parameter.

Garanaw\LaravelNumeral\Casts\AsNumeral

A new cast has also been added to the Eloquent's Casts folder. This will cast integers and floats to Numerals and back.


All versions of laravel-numeral with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2|^8.3
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 garanaw/laravel-numeral contains the following files

Loading the files please wait ....