ambrosethebuild/ghanaphonenumbervalidator

:A Laravel Package To Validate A Ghana Phone Number and Also Return the network it belongs to

1.0 2019-10-09 08:20 UTC

This package is auto-updated.

Last update: 2024-04-09 19:11:44 UTC


README

A Laravel Package To Validate A Ghana Phone Number and Also Return the network the phone number belongs to.

Installation

Via Composer

$ composer require ambrosethebuild/ghanaphonenumbervalidator

If you do not run Laravel 5.5 (or higher), then add the service provider in config/app.php:

AmbroseTheBuild\GhanaPhoneNumberValidator\GhanaPhoneNumberValidatorServiceProvider::class

Usage

use AmbroseTheBuild\GhanaPhoneNumberValidator\GhanaPhoneNumberValidator;


class ViewController extends Controller
{
    //

    public function ghana_phone_validator( Request $request ){
        
        //method takes phone number
        return GhanaPhoneNumberValidator::isValidGhanaNumber( $request->number );
        return GhanaPhoneNumberValidator::whichNetwork( $request->number );

    }


}

Change log

Please see the changelog for more information on what has changed recently.

Testing

$ composer test

Contributing

Please see contributing.md for details and a todolist.

Security

If you discover any security related issues, please email author email instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see the license file for more information.