mempool weather added

This commit is contained in:
HolgerHatGarKeineNode
2023-03-31 16:03:54 +02:00
parent 12e3f3269b
commit 7973a2032f
3 changed files with 6 additions and 4 deletions

View File

@@ -4,6 +4,7 @@ namespace App\Console\Commands\MempoolSpace;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Support\Facades\Http; use Illuminate\Support\Facades\Http;
use OpenAI;
class CacheRecommendedFees extends Command class CacheRecommendedFees extends Command
{ {

View File

@@ -2,6 +2,7 @@
namespace App\Http\Livewire\Banner; namespace App\Http\Livewire\Banner;
use App\Console\Commands\MempoolSpace\CacheRecommendedFees;
use Illuminate\Support\Facades\Artisan; use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Http; use Illuminate\Support\Facades\Http;
use Livewire\Component; use Livewire\Component;
@@ -21,7 +22,7 @@ class MempoolWeather extends Component
if (cache()->has('mempool-weather')) { if (cache()->has('mempool-weather')) {
$this->weather = cache()->get('mempool-weather'); $this->weather = cache()->get('mempool-weather');
} else { } else {
Artisan::call('test'); Artisan::call(CacheRecommendedFees::class);
$this->weather = cache()->get('mempool-weather'); $this->weather = cache()->get('mempool-weather');
} }
$result = Http::get('https://mempool.space/api/v1/fees/recommended'); $result = Http::get('https://mempool.space/api/v1/fees/recommended');