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)24372MITPHPPHP &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 today

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 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity59

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

1200d ago

Major Versions

1.0.3 → 2.0.02023-03-21

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/59211285?v=4)[Moh. Php Master ..](/maintainers/mPhpMaster)[@mPhpMaster](https://github.com/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

[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.

45444.2k1](/packages/pressbooks-pressbooks)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M188](/packages/laravel-ai)[illuminate/session

The Illuminate Session package.

9939.3M847](/packages/illuminate-session)[moonshine/moonshine

Laravel administration panel

1.3k253.1k81](/packages/moonshine-moonshine)[flarum/core

Delightfully simple forum software.

201.4M2.3k](/packages/flarum-core)[erag/laravel-lang-sync-inertia

A powerful Laravel package for syncing and managing language translations across backend and Inertia.js (Vue/React/Svelte) frontends, offering effortless localization, auto-sync features, and smooth multi-language support for modern Laravel applications.

4925.3k](/packages/erag-laravel-lang-sync-inertia)

PHPackages © 2026

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