Download the PHP package andrey-helldar/helpers without Composer
On this page you can find all versions of the php package andrey-helldar/helpers. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download andrey-helldar/helpers
More information about andrey-helldar/helpers
Files in andrey-helldar/helpers
Package helpers
Short Description Helpers that simplify the development process
License MIT
Homepage http://ai-rus.com
Informations about the package helpers
Helpers for Laravel 5.5+
Functions that simplify the development process.
Attention
This package is abandoned and no longer maintained. The author suggests using the andrey-helldar/support package instead.
Installation
To get the latest version of Helpers, simply require the project using Composer:
Instead, you may of course manually update your require block and run composer update
if you so choose:
If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php
:
You can also publish the config file to change implementations (ie. interface to specific class):
Now you can use helpers or access directly to interfaces.
Enjoy!
Documentation
Menu
- Arrays
- array_item_value_max_length
- array_add_unique
- array_rename_keys
- array_size_max_value
- array_sort_by_keys_array
- Digits
- factorial
- short_number
- Dumper
- dd_sql
- Files
- url_file_exists
- Http
- mix_url
- base_url
- build_url
- subdomain_name
- Jsonable
- Images
- image_or_default
- Notifications
- Strings
- str_choice
- e
- de
- str_replace_spaces
- Systems
- is_windows
- is_linux
Arrays
array_item_value_max_length()
Returns the number of characters of the longest element in the array:
array_add_unique()
Push one a unique element onto the end of array:
array_rename_keys()
Renaming array keys. As the first parameter, a callback function is passed, which determines the actions for processing the value. The output of the function must be a string with a name.
array_size_max_value()
Get the size of the longest text element of the array:
array_sort_by_keys_array()
Sort an associative array in the order specified by an array of keys.
Example:
[ to menu ]
Digits
factorial()
Calculating the factorial of a number:
short_number()
Converts a number into a short version:
Example:
[ to menu ]
Dumper
dd_sql()
Dump the passed variables and end the script.
[ to menu ]
Files
url_file_exists()
Checks whether a file or directory exists on URL:
[ to menu ]
Http
mix_url()
Convert the relative path of a versioned Mix files to absolute.
base_url()
Get the domain name from the URL.
build_url()
Reverse function for parse_url() (http://php.net/manual/en/function.parse-url.php).
The code is taken from gist.github.com/Ellrion
subdomain_name()
Retrieving the current subdomain name.
[ to menu ]
Jsonable
Convert the object to its JSON representation.
The code is taken from gist.github.com/Ellrion
[ to menu ]
Images
image_or_default()
Check the existence of the file and return the default value if it is missing:
[ to menu ]
Notifications
Notification helpers were placed in a separate package andrey-helldar/notify-exceptions.
[ to menu ]
Strings
str_choice()
The str_choice function translates the given language line with inflection:
Example:
e()
Escape HTML special characters in a string:
de()
Convert special HTML entities back to characters:
str_replace_spaces()
Replacing multiple spaces with a single space.
[ to menu ]
Systems
is_windows()
Determine whether the current environment is Windows based:
is_linux()
Determine whether the current environment is Linux based:
[ to menu ]
Copyright and License
Helpers was written by Andrey Helldar for the Laravel framework 5.5 or later, and is released under the MIT License. See the LICENSE file for details.
Translation
Translations of text and comment by Google Translate. Help with translation +1 in karma :)
All versions of helpers with dependencies
guzzlehttp/guzzle Version ^6.3
illuminate/contracts Version ^5.5
illuminate/support Version ^5.5