PHPackages                             bagsiz/easy-functions - 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. [Database &amp; ORM](/categories/database)
4. /
5. bagsiz/easy-functions

ActiveLibrary[Database &amp; ORM](/categories/database)

bagsiz/easy-functions
=====================

Laravel package for useful &amp; easy PHP functions

v1.1.2(6y ago)19PHPPHP ^7.2

Since May 24Pushed 6y agoCompare

[ Source](https://github.com/bagsiz/easy-functions)[ Packagist](https://packagist.org/packages/bagsiz/easy-functions)[ Docs](https://github.com/bagsiz/easy-functions)[ RSS](/packages/bagsiz-easy-functions/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (5)Dependencies (4)Versions (7)Used By (0)

easy-functions
==============

[](#easy-functions)

Laravel package for useful &amp; easy functions

[![Latest Version](https://camo.githubusercontent.com/1c59aadd6c729fc5775c0b3b89c78fac85cf134161465c74227a11306efac208/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f62616773697a2f656173792d66756e6374696f6e732e7376673f7374796c653d666c61742d737175617265)](https://github.com/bagsiz/easy-functions/releases)[![Build Status](https://camo.githubusercontent.com/3061259b3c09231e57b1c9c551dd27f46f65a603f9cd12c3f9c04a38d90a420f/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f62616773697a2f656173792d66756e6374696f6e732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/bagsiz/easy-functions)[![StyleCI](https://camo.githubusercontent.com/7287322c22ae6392f9ebbf3edb9b6de6b21cb3fcea979506288997cf798dec77/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3138383432353435372f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/188425457)[![Quality Score](https://camo.githubusercontent.com/2b481cdd2f2fdefe7e2331b93877e198cdf5a0f79948933361cf277975a3b098/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f7175616c6974792f672f62616773697a2f656173792d66756e6374696f6e732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/bagsiz/easy-functions)[![codecov](https://camo.githubusercontent.com/a379b85c6ce0623ea38639cbc92c715ca06d78b2f576a810dbbb880b575eb5ee/68747470733a2f2f636f6465636f762e696f2f67682f62616773697a2f656173792d66756e6374696f6e732f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/bagsiz/easy-functions)[![Total Downloads](https://camo.githubusercontent.com/305be931c82d7ab5a4cab3ebb8dea03f83d0f47496f79ec9161cdb59886bd623/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f62616773697a2f656173792d66756e6374696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/bagsiz/easy-functions)

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

[](#installation)

This package can be installed through Composer.

```
composer require bagsiz/easy-functions
```

Functions
---------

[](#functions)

### checkFieldForRandom

[](#checkfieldforrandom)

This function aims to check a model's fields against a random value and return that value

#### Usage

[](#usage)

For example we want to check the `id` fields of `App\User` model, you should write;

```
function checkUserModel() {
  $user = new User();
  $return EasyFunction::checkFieldForRandom($user, 'id', 'int', 8);
}
```

`checkFieldForRandom($model, string $field, string $type, int $length)`

- $model = The collection of the model
- $fiels = The field of the model -&gt; String `'field'`
- $type = The type of value you want to generate -&gt; String `'str'` or Integer `'int'`. Default `'str'`
- $length = The length of value you want to generate -&gt; Int `8`. Default `8`

### decimalToTime

[](#decimaltotime)

This function aims to convert an integer with a decimal to time string

#### Usage

[](#usage-1)

```
function someFunction() {
  $timeString = EasyFunction::decimalToTime(936437.85); // Should return "10:20:07:17.85"
}
```

`decimalToTime(int $decimal)`

- $decimal = Must have a "." for decimal part. (Ex: 23.56)

Testing
-------

[](#testing)

```
./vendor/bin/phpunit
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~27 days

Total

5

Last Release

2440d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e6b0f3e32d9c4b7d5a9974c11b25348d88b289891eca38f177774055ccd5741a?d=identicon)[muratbagsiz](/maintainers/muratbagsiz)

---

Top Contributors

[![bagsiz](https://avatars.githubusercontent.com/u/50661897?v=4)](https://github.com/bagsiz "bagsiz (21 commits)")

---

Tags

decimal-timeeasy-functionseloquentlaravelmodelslaravelfunctionseasybagsiz

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bagsiz-easy-functions/health.svg)

```
[![Health](https://phpackages.com/badges/bagsiz-easy-functions/health.svg)](https://phpackages.com/packages/bagsiz-easy-functions)
```

###  Alternatives

[tpetry/laravel-postgresql-enhanced

Support for many missing PostgreSQL specific features

9982.0M14](/packages/tpetry-laravel-postgresql-enhanced)[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11320.2M21](/packages/anourvalar-eloquent-serialize)[clickbar/laravel-magellan

This package provides functionality for working with the postgis extension in Laravel.

423715.4k1](/packages/clickbar-laravel-magellan)[reedware/laravel-relation-joins

Adds the ability to join on a relationship by name.

2121.2M13](/packages/reedware-laravel-relation-joins)[dragon-code/laravel-deploy-operations

Performing any actions during the deployment process

240173.5k2](/packages/dragon-code-laravel-deploy-operations)[toponepercent/baum

Baum is an implementation of the Nested Set pattern for Eloquent models.

3154.7k](/packages/toponepercent-baum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
