Download the PHP package propaysystems/utilities without Composer
On this page you can find all versions of the php package propaysystems/utilities. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download propaysystems/utilities
More information about propaysystems/utilities
Files in propaysystems/utilities
Package utilities
Short Description A set of helper utilities and traits
License MIT
Homepage https://github.com/propaysystems/utilities
Informations about the package utilities
Propay Utilities
A set of helper utilities and traits to common functions we use everyday and across all our systems.
Requirements
PHP 8.1+
Laravel 9+
Installation
You can install the package via composer:
You can publish the config file with:
Features
Helpers
-- Database Helper --
Clears all data and reset auto increment on given table.
-- Date Helper --
This will get the month name of the month number you pass in. Abbreviation will return the short name of the month.
Get current financial year of South Africa
Get time
-- File Helper --
This will get the human-readable format of the bytes you pass in
-- Http Helper --
Get the currently assigned public ip address of the request
Get the currently useragent of the request
Get the hostname/domain name of the system. You can specify full to return http::// parts aswell
Get the subdomain of the current system
-- Id Number Helper --
Generate a fake id number for testing from the date of birth
Generate a complete fake id number for testing
Get gender from the id number
Get the date of birth from the id number
Get age from the id number
Validate the id number
-- Number Helper --
Will generate a random integer between 1 and 100 000
Will get the % difference between 2 number
This will format the number accordingly 100000 will become 100.00k
This will combine a country prefix ex: 27 with the cell number ex: 0821231234 and return 27821231234
-- Route Helper --
Check of the string is in the current route name
-- SMS Helper --
Get the number of sms messages from the string
-- Spatie Media Helper --
Helper functions related to the spatie media package for managing files
https://spatie.be/docs/laravel-medialibrary/v10/introduction
-- String Helper --
This will get the first character of each word and capitalise them and only return first letter/s
This will capitalise first character of each word and return the string
Removed all white spaces and special characters
This will generate a random password
This will mask a string with relevant characters
Transform db column name to human-readable
Transform db column name to human-readable relation
Return a list of all special characters
Traits
Include these traits in any of your classes
-- Activity Helper Trait --
This is a helper function to the spatie activity log package
https://spatie.be/docs/laravel-activitylog/v4/introduction
-- TableHelper Trait --
This is a helper for the WireUI notifications to easily fire a notification from any livewire class. https://v1.wireui.dev/
-- Dropdown Schema Trait --
Use the trait in your database models instead of having to write the boilerplate code multiple times
-- Composite Primary Key Trait --
Use the trait in your database models to allow access to composite primary keys
-- Password Strength Trait --
Us this trait for password strength progress bar.
-- Password Validation Trait --
Us this trait for standard password validation.
-- Save to uppercase Trait --
This will fave all your model data to uppercase
-- Set null on empty Trait --
This will force all empty string to be null instead of empty
-- Toggle triggers Trait --
This will toggle enable or disable triggers in the relevant database table
-- TableHelper Trait --
This is a helper for the livewire powergrid package on for the pagination. https://livewire-powergrid.com/
Testing
Run pest testing
Run phpstan code analysis
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Ettienne Louw
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of utilities with dependencies
spatie/laravel-package-tools Version ^1.14.0
illuminate/contracts Version ^9.0|^10.0
bjeavons/zxcvbn-php Version ^1.0