Files
gsf/app/Console/Commands/UpdateUserRanking.php
vedant-chavan 20f55281ef save to codehub
2024-08-09 17:11:41 +05:30

40 lines
860 B
PHP

<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use DB;
class UpdateUserRanking extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'user:ranking';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Update User Ranking In every Minute';
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
$schedule->call(function () {
$client = new \GuzzleHttp\Client();
$response = $client->get('http://gsf.betadelivery.com/api/getUserRanking');
// Handle the API response as needed
// $statusCode = $response->getStatusCode();
// ...
})->everyMinute();
}
}