Download the PHP package fisharebest/laravel-floats without Composer

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

License: MIT Latest Stable Version Build Status Coverage Status Scrutinizer Code Quality

laravel-floats

This package allows database migrations in Laravel 5, Laravel 6 and Laravel 7 to create FLOAT columns in MySQL.

Huh? You mean that Laravel does not support floating point columns?

Sadly no. It only supports double-precision floating point columns. If you want single-precision floating point, you need to use DB::raw().

This is despite the Laravel documentation at https://laravel.com/docs/5.8/migrations which states:

$table->float('amount', 8, 2); FLOAT equivalent column with a precision (total digits) and scale (decimal digits).

$table->double('amount', 8, 2); DOUBLE equivalent column with a precision (total digits) and scale (decimal digits).

You can read all about it at https://github.com/laravel/framework/issues/3151 and many other issues.

In your migration Laravel 5.0 - 7.0 With this package
$table->float('col'); DOUBLE(8,2) FLOAT
$table->float('col', 0); DOUBLE FLOAT
$table->float('col', 5); DOUBLE(5,2) FLOAT
$table->float('col', 5, 3); DOUBLE(5,3) FLOAT(5,3)
$table->double('col'); DOUBLE DOUBLE
$table->double('col', 0); DOUBLE DOUBLE
$table->double('col', 5); DOUBLE DOUBLE
$table->double('col', 5, 3); DOUBLE(5,3) DOUBLE(5,3)

Installation

Package discovery takes care of everything on Laravel 5.5 and later. If you're using Laravel 5.4 or earlier, you'll need to replace an alias in config/app.php.

NOTE: this assumes you are using Laravel to autoload your facades using the aliases.

If you explicitly import Laravel's schema builder using use Illuminate\Support\Facades\Schema; then you will need to change this to use Fisharebest\LaravelFloats\Schema;.

How does this package work?

We extend the MySQL Grammar, modify the blueprint for float(), and then bind the updated grammar back into the IoC container.


All versions of laravel-floats with dependencies

PHP Build Version
Package Version
Requires php Version ~5.6|~7.0
illuminate/database Version ~5.0|~6.0|~7.0|~8.0
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 fisharebest/laravel-floats contains the following files

Loading the files please wait ....