Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
myckhel authored Dec 10, 2020
1 parent f16955d commit e72afec
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
<?php
return [
"apikey" => env("CHECKWA_API_KEY"),
Expand All @@ -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
Expand All @@ -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,
Expand All @@ -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",
Expand Down

0 comments on commit e72afec

Please sign in to comment.