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

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

mphpmaster/laravel-app-helpers
==============================

Laravel Helpers: App

2.0.0(3y ago)24342MITPHPPHP &gt;=8.1

Since Dec 20Pushed 2y ago1 watchersCompare

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

READMEChangelog (4)Dependencies (4)Versions (6)Used By (2)

Laravel Helpers: App
====================

[](#laravel-helpers-app)

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

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

v2.0.0

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

[](#dependencies)

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

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

[](#installation)

```
composer require mphpmaster/laravel-app-helpers
```

Content
-------

[](#content)

- Providers:

    - `MPhpMaster\LaravelAppHelpers\Providers\HelperProvider`.
- Macros:

    - Add `firstOrCreateOrRestore` method to `Query Builder` and `Model`
    - Add `randomOr` method to `Query Builder` and `Model`
    - Add `randomOrCreate` method to `Query Builder` and `Model`
    - Add `randomOrNew` method to `Query Builder` and `Model`
    - Add `randomOrFactory` method to `Query Builder` and `Model`
    - Add `randomOrCreateFactory` method to `Query Builder` and `Model`
    - Add `randomOrNewFactory` method to `Query Builder` and `Model`
    - Add `randomOr` method to `Model Factory`
    - Add `randomOrCreate` method to `Model Factory`
    - Add `randomOrNew` method to `Model Factory`
- Functions:

    - `currentLocale`
    - `currentUrl`
    - `currentUser`
    - `currentUserId`
    - `currentUserName`
    - `currentAuth`
    - `getDefaultGuardName`
    - `getDefaultDiskDriver`
    - `getLocales`
    - `getDefaultLocale`
    - `getModelRelationAttribute`
    - `filenameWithoutExtension`
    - `isAdmin`
    - `isSuperAdmin`
    - `isLocaleAllowed`
    - `isRunningInConsole`
    - `R`
    - `currencyFormat`
    - `currencyFormatEn`
    - `apiResource`
    - `apiResources`
    - `fixPath`
    - `includeSubFiles`
    - `includeAllSubFiles`
    - `includeIfExists`
    - `includeOnceIfExists`

> *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 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 58.8% 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 ~30 days

Total

4

Last Release

1148d ago

Major Versions

1.0.3 → 2.0.02023-03-21

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

helpersapp helpers

### Embed Badge

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

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M158](/packages/orchestra-canvas)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[ronasit/laravel-helpers

Provided helpers function and some helper class.

1475.7k13](/packages/ronasit-laravel-helpers)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

116.6k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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