larabra / str
Laravel Illuminate\Support\Str extended
v1.0.1
2019-11-19 01:00 UTC
Requires
- php: >=5.4.0
- illuminate/support: >=4.2
- larabra/metaphone: ^1.0
This package is not auto-updated.
Last update: 2026-02-19 06:42:43 UTC
README
| Method | Helper | Description |
|---|---|---|
Str::sanitizeName(string $string): string |
str_sanitize_name(string $string): string |
Sanitize names removing diacritics, changing to uppercase and removing duplicate blank spaces |
Str::sanitizeNumber(string $string): string |
str_sanitize_number(string $string): string |
Sanitize numbers removing non-numeric characters. Very useful to unmask documents or phone number |
Str::metaphone(string $string): string |
str_metaphone(string $string): string |
Metaphone is a phonetic algorithm for indexing words by their pronunciation |
Installation
Step 1: Install package via Composer
composer require larabra/str
Step 2: If you are using Laravel 5, include the service provider within your config/app.php file.
'providers' => [ Larabra\Str\LarabraStrServiceProvider::class, ];