Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/litto/utilities
Custom Functions for Generating slugs,passwords,paerse string.etc.
https://github.com/litto/utilities
Last synced: about 1 month ago
JSON representation
Custom Functions for Generating slugs,passwords,paerse string.etc.
- Host: GitHub
- URL: https://github.com/litto/utilities
- Owner: litto
- Created: 2022-02-07T05:46:15.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-02-07T06:07:57.000Z (almost 3 years ago)
- Last Synced: 2024-05-03T07:22:43.774Z (8 months ago)
- Language: PHP
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Utilities Functions
Custom Functions for Generating slugs,passwords,parse string.etc.##How to Install?
You can install by running command in composer
composer require litto/utilities:v1.0## How to use?
Initialize Class Utilities by calling:-
$obj=new Utilities();
$encodedstr=$obj->encode($str);Call each Function define in the Utilities Class like this. Below are some of functions available.
1) getRandom() - get random string using current timestamp
2) getExtension($string) - Get extension of the file you pass into this function
3) setPattern($array) - Set pattern for Filter Function
4) filterChars($string) - Filter chars from string
5) dateDisplayFormat($date)-Convert Date to M-d-Y Format
6) dateTimeDisplayFormat($date) - Convert date time to M-d-Y H:i:s format
7) dateInsertFormat($date) - Convert date time to database date format for saving
8) encodeString($string) - Encode your string
9) decodeString($string) - Decode your string
10) priceFormat($price) - Convert to price format for display
11) addFilter($string)- Filtering string
12) encode($originalStr) - Password Encode
13) decode($decodedStr) - Decode Password
14) littoformattitle($text)- Generate slug variable passing string
15) getBaseUrl()- get base url of project