Skip to content

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

License

Notifications You must be signed in to change notification settings

ambrosethebuild/GhanaPhoneNumberValidator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GhanaPhoneNumberValidator

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.

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages