evilcorp/genderize

Laravel 5 extension of gender api.

dev-master 2017-01-18 11:19 UTC

This package is not auto-updated.

Last update: 2024-11-23 20:59:06 UTC


README

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'