PHP code example of myckhel / checkwa

1. Go to this page and download the library: Download myckhel/checkwa library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

myckhel / checkwa example snippets



return [
  "apikey"          => env("CHECKWA_API_KEY"),
  "user"            => env("CHECKWA_USER"),
  "server"          => env("CHECKWA_SERVER", 462),
  "server_type"     => env("CHECKWA_SERVER_TYPE", "public"),
  "callback"        => env("CHECKWA_CALLBACK"),
];

use Checkwa;
use Illuminate\Support\Str;

public function checkWa(Request $request){

  return Checkwa::check($request->phone, $request->phone_code, ['token' => Str::random(), 'hide_image' => '1']);
}

use Checkwa;
use Illuminate\Support\Str;

public function checkWa(Request $request){

  return Checkwa::check($request->phone, $request->phone_code, ['token' => Str::random(), 'hide_image' => '1']);
}
bash
php artisan vendor:publish --provider="myckhel\Checkwa\CheckwaServiceProvider"