mphpmaster / laravel-helpers2
Laravel Helpers2
1.2.5
2024-03-03 07:18 UTC
Requires
- php: >=8.1
- illuminate/support: >=8
- laravel/framework: >=8
- laravel/helpers: ^1.5
README
Part of mphpmaster/laravel-helpers:^3
v1.2.5
Dependencies:
- php >=8.1 REQUIRED IN YOUR PROJECT
- laravel >=8 REQUIRED IN YOUR PROJECT
- illuminate/support >=8 composer will install it automaticly
- laravel/helpers ^1.5 composer will install it automaticly
Installation:
composer require mphpmaster/laravel-helpers2
Content
-
Providers:
MPhpMaster\LaravelHelpers2\Providers\HelperProvider
-
Traits:
MPhpMaster\LaravelHelpers2\Traits\TModelTranslation
MPhpMaster\LaravelHelpers2\Traits\TMacroable
-
Macros:
- Add
getSql
method toQuery Builder
andModel
- Add
paginate
method toCollection
- Add
mergeIfMissing
method toCollection
- Add
-
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:
- Add
locales
key toconfig/app.php
// example: 'locales' => [ 'en' => 'English', 'ar' => 'عربي', ],
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.