PHPackages                             recycledbeans/useful-things - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. recycledbeans/useful-things

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

recycledbeans/useful-things
===========================

A collection of helpers and useful things for developing PHP applications

v2.0.2(5y ago)14.3kMITPHP

Since Oct 31Pushed 5y ago1 watchersCompare

[ Source](https://github.com/recycledbeans/useful-things)[ Packagist](https://packagist.org/packages/recycledbeans/useful-things)[ RSS](/packages/recycledbeans-useful-things/feed)WikiDiscussions master Synced yesterday

READMEChangelog (8)DependenciesVersions (9)Used By (0)

Useful Things for PHP
=====================

[](#useful-things-for-php)

A collection of helpers and useful things for developing PHP applications.

Installation
------------

[](#installation)

Use composer to include the latest version.

```
composer require recycledbeans/useful-things
```

Money
-----

[](#money)

Contains a helpful trait to use when converting monetary values back and forth between float values (for display) and integer values (for storage and arithmetic).

The example below is a Laravel Eloquent model that has an accessor that formats the amount to a float value from how it is stored in the database (as an integer) when the attribute is accessed, and a mutator that sets the value back to an integer value before it is stored in the database.

```
