mphpmaster / laravel-app-helpers
Laravel Helpers: App
2.0.0
2023-03-21 00:32 UTC
Requires
- php: >=8.1
- illuminate/filesystem: >=9
- illuminate/support: >=9
- laravel/framework: >=9
- laravel/helpers: ^1.5
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 toQuery Builder
andModel
- Add
randomOr
method toQuery Builder
andModel
- Add
randomOrCreate
method toQuery Builder
andModel
- Add
randomOrNew
method toQuery Builder
andModel
- Add
randomOrFactory
method toQuery Builder
andModel
- Add
randomOrCreateFactory
method toQuery Builder
andModel
- Add
randomOrNewFactory
method toQuery Builder
andModel
- Add
randomOr
method toModel Factory
- Add
randomOrCreate
method toModel Factory
- Add
randomOrNew
method toModel Factory
- Add
-
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.