Download the PHP package movemoveapp/laravel-maxmind without Composer

On this page you can find all versions of the php package movemoveapp/laravel-maxmind. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-maxmind

🌍 Laravel MaxMind

Latest Stable Version Total Downloads Latest Unstable Version License PHP Version Require

Laravel MaxMind is a simple and flexible package for accessing MaxMind GeoIP2 data passed via Nginx FastCGI parameters.

It allows your Laravel application to read geolocation and ISP information that is resolved by Nginx using the GeoIP2 module, without querying MaxMind databases directly from PHP.


Features


Requirements


Installation

Register the Service Provider

After installing the package, you need to register the MaxMind service provider.

Laravel 10 and below

Add the following line to the providers array in your config/app.php file:

Laravel 11 and above

Register the service provider in the bootstrap/providers.php file:

Publish the Configuration

To publish the configuration file and customize the package settings, run the following Artisan command:

Configuration

Once published, the configuration file will be available at config/maxmind.php.

This file maps MaxMind geolocation headers to internal configuration keys. You may override the defaults using your .env file. Below are the available environment variables and their default values:

Each configuration key corresponds to a header (typically set via a reverse proxy or edge server like Nginx). You can override any of these defaults by defining the respective environment variable in your .env file.

Nginx Configuration

To ensure that the MaxMind headers are correctly passed to your Laravel application, you need to configure your Nginx (or other reverse proxy) to forward the appropriate HTTP headers. These headers typically come from services like MaxMind's GeoIP2 or your CDN (e.g., Cloudflare, Fastly, or your own proxy setup).

Below is a sample Nginx configuration that sets the headers based on your upstream data (e.g., using geoip2 module or an external resolver):

Step 1: Enable GeoIP2 in nginx.conf

You must configure the ngx_http_geoip2_module to extract the relevant fields from your MaxMind .mmdb files:

Step 2: Pass GeoIP2 Data via fastcgi_param

In your site configuration (typically under sites-available/your-site.conf), include the following fastcgi_param directives in the location ~ \.php$ block to pass GeoIP2 values to PHP:

⚠️ These parameters will be available in Laravel using $request->server('HTTP_X_CONTINENT_NAME'), etc. The package automatically maps them internally — you don't need to manually extract them in your controller.

Verifying Integration

To verify that your headers are being received:

  1. Run php artisan route:clear to refresh routing cache.
  2. Create a debug route:

  3. Access /debug-geo in your browser and check for HTTP_X_CONTINENT_NAME, HTTP_X_COUNTRY_NAME, etc.

Helpers

Detect IP type

Then you can use the detectIpType function like this:


All versions of laravel-maxmind with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0|^8.1|^8.2|^8.3|^8.4
ext-json Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package movemoveapp/laravel-maxmind contains the following files

Loading the files please wait ....