wheredidgogogo / nameparser
Nameparser
Installs: 816
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Type:laravel
This package is not auto-updated.
Last update: 2024-11-22 05:32:40 UTC
README
This is a laravel version of PHP Name Parser by Josh Fraser
https://github.com/joshfraser/PHP-Name-Parser
Split a single string into the following array:
array: [ salutation, fname, initials, lname, lname_base, lname_compound, suffix ]
This package allows you to use a single input field for a user or customer name and then split the single string into its individual name components.
Installation
Composer
composer require wheredidgogogo/nameparser
Laravel
Add Provider
In your config/app.php
add the following:
'providers' => [ ... Wheredidgogogo\Nameparser\NameparserServiceProvider::class, ... ], 'alias' => [ ... 'Nameparser' => Wheredidgogogo\Nameparser\NameparserFacade::class, ... ],
Use
$results = \Nameparser::parse_name('Anthony Gherghetta')