pepeshark / genderize by pepeshark

Laravel 5 extension of gender api.
8
0
1
Package Data
Maintainer Username: pepeshark
Maintainer Contact: metrojeans@gmail.com (pepe)
Package Create Date: 2017-01-16
Package Last Update: 2017-01-18
Language: PHP
License: MIT
Last Refreshed: 2024-11-19 03:13:46
Package Statistics
Total Downloads: 8
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 0
Total Watchers: 1
Total Forks: 0
Total Open Issues: 0

Laravel 5 package for genderize.io API

Package for Genderize API https://genderize.io/

Installing Genderize

Step 1: Add the stability

composer.json

"minimum-stability": "dev",
"prefer-stable" : true

Step 2: Install Through Composer

composer require evilcorp/genderize

Step 3: Add the ServiceProvider to provider

app/config/app.php

'provider' => [
    ...
    Evilcorp\Genderize\GenderizeServiceProvider::class,
    ...
];

Step 4: Add the Facade to aliases

app/config/app.php

'aliases' => [
    ...
    'Genderize' => Evilcorp\Genderize\Facade\Genderize::class,
    ...
];

Usage

use Genderize;

print  Genderize::getGender('Peter');       // 'male'
print  Genderize::getGender('Victoria');    // 'female'
print  Genderize::getGender('asd');         // 'unknown'