diff --git a/README.md b/README.md index c7dbad2..565fbff 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ # Checkwa [![Latest Version](https://img.shields.io/github/release/myckhel/checkwa.svg?style=flat-square)](https://github.com/myckhel/checkwa/releases) -![GitHub Workflow Status](https://img.shields.io/github/workflow/status/myckhel/checkwa/run-tests?label=tests) [![Total Downloads](https://img.shields.io/packagist/dt/myckhel/checkwa.svg?style=flat-square)](https://packagist.org/packages/myckhel/checkwa) Laravel package to check valid whatsapp number using checkwa api @@ -12,18 +11,18 @@ PHP ^7 Checkwa can be installed using composer -``` +```bash composer require myckhel/checkwa ``` ## Setup Publish the config file -``` +```bash php artisan vendor:publish --provider="myckhel\Checkwa\CheckwaServiceProvider" ``` checkwa.php should be copied to the config directory containing -``` +```php env("CHECKWA_API_KEY"), @@ -35,7 +34,7 @@ return [ ``` Create environment variables in your app's .env file -``` +```env CHECKWA_API_KEY=XXXXXX-XXXXXX-XXXXXX-XXXXXX-XXXXXX CHECKWA_USER=user CHECKWA_SERVER=40 @@ -45,18 +44,18 @@ CHECKWA_CALLBACK=https://api.callback.url/checkwa/callback ## Usage ### Check Valid Whatsapp Number Using Public Server -``` +```php use Checkwa; use Illuminate\Support\Str; ``` -``` +```php public function checkWa(Request $request){ return Checkwa::check($request->phone, $request->phone_code, ['token' => Str::random(), 'hide_image' => '1']); } ``` #### Example Valid Response -``` +```json { "code": "001", "checks": 5, @@ -71,18 +70,18 @@ public function checkWa(Request $request){ ``` ### Check Valid Whatsapp Number Using Private Server -``` +```php use Checkwa; use Illuminate\Support\Str; ``` -``` +```php public function checkWa(Request $request){ return Check::check($request->phone, $request->phone_code, ['token' => Str::random(), 'hide_image' => '1']); } ``` #### Example Valid Response Using Private Server -``` +```json { "code": "1", "server": "54",