PHPackages                             mphpmaster/laravel-helpers2 - 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. mphpmaster/laravel-helpers2

ActiveLibrary

mphpmaster/laravel-helpers2
===========================

Laravel Helpers2

1.2.5(2y ago)14542MITPHPPHP &gt;=8.1

Since Dec 28Pushed 2y ago1 watchersCompare

[ Source](https://github.com/mPhpMaster/laravel-helpers2)[ Packagist](https://packagist.org/packages/mphpmaster/laravel-helpers2)[ RSS](/packages/mphpmaster-laravel-helpers2/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (7)Dependencies (3)Versions (10)Used By (2)

Laravel Helpers2
================

[](#laravel-helpers2)

###### Part of mphpmaster/laravel-helpers:^3

[](#part-of-mphpmasterlaravel-helpers3)

v1.2.5

Dependencies:
-------------

[](#dependencies)

- php &gt;=8.1 **REQUIRED IN YOUR PROJECT**
- laravel &gt;=8 **REQUIRED IN YOUR PROJECT**
- illuminate/support &gt;=8 *composer will install it automaticly*
- laravel/helpers ^1.5 *composer will install it automaticly*

Installation:
-------------

[](#installation)

```
composer require mphpmaster/laravel-helpers2
```

Content
-------

[](#content)

- Providers:

    - `MPhpMaster\LaravelHelpers2\Providers\HelperProvider`
- Traits:

    - `MPhpMaster\LaravelHelpers2\Traits\TModelTranslation`
    - `MPhpMaster\LaravelHelpers2\Traits\TMacroable`
- Macros:

    - Add `getSql` method to `Query Builder` and `Model`
    - Add `paginate` method to `Collection`
    - Add `mergeIfMissing` method to `Collection`
- Functions:

    - `isArrayableItems`
    - `array_keys_exists`
    - `isJsonable`
    - `isJsonSerializable`
    - `isArrayable`
    - `isClosure`
    - `isClass`
    - `isCallable`
    - `isArrayableOrArray`
    - `isAllable`
    - `isInvocable`
    - `isPaginator`
    - `isPaginated`
    - `isConsole`
    - `isBuilder`
    - `isLocaleAllowed`
    - `endsWithAny`
    - `isModel`
    - `isRelation`
    - `isCarbon`
    - `isDateTime`
    - `isTraversable`
    - `hasArabicChars`
    - `is_collection`
    - `stringContainsAll`
    - `stringContains`
    - `stringEnds`
    - `stringStarts`
    - `isUrl`
    - `toCollect`
    - `toCollectWithModel`
    - `toCollectOrModel`
    - `toObjectOrModel`
    - `str_before_last_count`
    - `getTable`
    - `getFillable`
    - `getHidden`
    - `getModel`
    - `getModelClass`
    - `getClass`
    - `hasTrait`
    - `hasScope`
    - `hasConst`
    - `getConst`
    - `getSql`
    - `getLocales`
    - `str_prefix`
    - `str_suffix`
    - `str_words_limit`
    - `prefixNumber`
    - `prefixText`
    - `countToken`
    - `replaceTokens`
    - `getTrans`
    - `getNumbers`
    - `getArrayableItems`
    - `valueToDate`
    - `valueToDateTime`
    - `valueToArray`
    - `valueToUnDotArray`
    - `valueToDotArray`
    - `valueToObject`
    - `valueFromJson`
    - `valueToJson`
    - `getValue`
    - `arrayToObject`
    - `arrayToStdClass`
    - `getModelKey`
    - `trimDirectorySeparator`
    - `convert_to_en_numbers`
    - `array_only_except`
    - `array_except_only`
    - `replaceAll`
    - `carbon`
    - `firstSet`
    - `getAny`
    - `test`
    - `iif`
    - `modelToQuery`
    - `trimLower`
    - `trimUpper`
    - `withKey`
    - `wrapWith`
    - `wrapWithData`
    - `unwrapWith`
    - `when`
    - `whenInConsole`
    - `undot`

To add:
-------

[](#to-add)

- Add `locales` key to `config/app.php`

```
// example:
    'locales' => [
        'en' => 'English',
        'ar' => 'عربي',
    ],
```

> *Inspired by laravel/helpers.*

License
-------

[](#license)

The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

The Laravel Helpers: App is open-sourced software licensed under the [MIT license](https://github.com/mPhpMaster/laravel-app-helpers/blob/master/LICENSE).

---

Stand with Palestine 🇵🇸 *\#FreePalestine*
-----------------------------------------

[](#stand-with-palestine--freepalestine)

###  Health Score

30

—

LowBetter than 65% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 55.6% 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 ~61 days

Recently: every ~89 days

Total

8

Last Release

798d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/653f207f1b16ec4055eea8fd8699991febd6a1a0201011ab3d1a6ece3bbfd511?d=identicon)[mPhpMaster](/maintainers/mPhpMaster)

---

Top Contributors

[![mPhpMaster](https://avatars.githubusercontent.com/u/59211285?v=4)](https://github.com/mPhpMaster "mPhpMaster (10 commits)")[![m-alsafadi](https://avatars.githubusercontent.com/u/89378271?v=4)](https://github.com/m-alsafadi "m-alsafadi (8 commits)")

---

Tags

helpershelpers2

### Embed Badge

![Health badge](/badges/mphpmaster-laravel-helpers2/health.svg)

```
[![Health](https://phpackages.com/badges/mphpmaster-laravel-helpers2/health.svg)](https://phpackages.com/packages/mphpmaster-laravel-helpers2)
```

###  Alternatives

[laravel/helpers

Provides backwards compatibility for helpers in the latest Laravel release.

80660.2M456](/packages/laravel-helpers)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

44643.1k1](/packages/pressbooks-pressbooks)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)[ronasit/laravel-helpers

Provided helpers function and some helper class.

1475.7k13](/packages/ronasit-laravel-helpers)

PHPackages © 2026

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