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
Requires
- illuminate/support: ~5.1|^6.0
Requires (Dev)
- mockery/mockery: ^1.0
- orchestra/testbench: ~3.0
- phpunit/phpunit: ~4.0|~5.0
- sempro/phpunit-pretty-print: ^1.0
This package is auto-updated.
Last update: 2025-03-09 21:07:43 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.