mphpmaster/laravel-app-helpers

Laravel Helpers: App

2.0.0 2023-03-21 00:32 UTC

This package is auto-updated.

Last update: 2024-05-04 08:20:26 UTC


README

Part of mphpmaster/laravel-helpers:^3

v2.0.0

Dependencies:

  • php >=8.1 REQUIRED IN YOUR PROJECT
  • laravel >=9 REQUIRED IN YOUR PROJECT
  • illuminate/support >=9 composer will install it automaticly
  • illuminate/filesystem >=9 composer will install it automaticly
  • laravel/helpers ^1.5 composer will install it automaticly

Installation:

composer require mphpmaster/laravel-app-helpers

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

The Laravel framework is open-sourced software licensed under the MIT license.

The Laravel Helpers: App is open-sourced software licensed under the MIT license.

Stand with Palestine 🇵🇸 #FreePalestine