File: /var/www/html/app/Livewire/Auth/Google.php
<?php
namespace App\Livewire\Auth;
use Livewire\Component;
use App\Services\ApiEndpoints;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Cache;
class Google extends Component
{
public $countries;
public function mount()
{
$this->countries = Cache::remember('countries', 60 * 60 * 24 * 30, function () {
return Http::get(ApiEndpoints::getCountry())->json()['data'];
});
}
public function render()
{
return view('livewire.auth.google');
}
}