OiO.lk Blog PHP Cannot make static method Illuminate\Support\Facades\Http::preventStrayRequests() non static in class Illuminate\Http\Client\PendingRequest
PHP

Cannot make static method Illuminate\Support\Facades\Http::preventStrayRequests() non static in class Illuminate\Http\Client\PendingRequest


I have error in Laravel

Cannot make static method
Illuminate\Support\Facades\Http::preventStrayRequests() non static in
class Illuminate\Http\Client\PendingRequest

use Illuminate\Support\Facades\Http;

public function parse(string $productId): void
    {
        $this->productId = $productId;
        
        $url = self::DETAIL_URL . $productId;
        
        $response = Http::get($url);
        $json = json_decode($response->body(), true);
        $this->data = $json['data']['products'][0] ?? [];
    }



You need to sign in to view this answers

Exit mobile version