PHPackages                             bakerkretzmar/laravel-mapbox - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. bakerkretzmar/laravel-mapbox

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

bakerkretzmar/laravel-mapbox
============================

A Laravel package for managing Mapbox Datasets and Tilesets.

1.1.1(6y ago)72.0k2[1 issues](https://github.com/bakerkretzmar/laravel-mapbox/issues)MITPHPPHP ^7.2

Since Jun 20Pushed 6y agoCompare

[ Source](https://github.com/bakerkretzmar/laravel-mapbox)[ Packagist](https://packagist.org/packages/bakerkretzmar/laravel-mapbox)[ Docs](https://github.com/bakerkretzmar/laravel-mapbox)[ RSS](/packages/bakerkretzmar-laravel-mapbox/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (4)Versions (5)Used By (0)

Laravel Mapbox
==============

[](#laravel-mapbox)

[![Build status](https://camo.githubusercontent.com/8dc799a5b4de11610fb9b320a0c2ebf93b2641d4e117b76bfaeb7d977fe082a8/68747470733a2f2f7472617669732d63692e6f72672f62616b65726b7265747a6d61722f6c61726176656c2d6d6170626f782e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/bakerkretzmar/laravel-mapbox)[![StyleCI](https://camo.githubusercontent.com/9a09c3d17efc3d81742827bbffee39d3f5f7ebcd0fbc6ece6316c6f3fe8ca103/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3139323932353337352f736869656c643f6272616e63683d6d6173746572267374796c653d666c6174)](https://github.styleci.io/repos/192925375)[![Scrutinizer code quality](https://camo.githubusercontent.com/fca425b5df83a3a9cb18d58b3020846bf9c04075361579b83b1382deec7acb01/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f62616b65726b7265747a6d61722f6c61726176656c2d6d6170626f782f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/bakerkretzmar/laravel-mapbox/?branch=master)[![Code coverage](https://camo.githubusercontent.com/d783eb29536b42cf72a22b5d3d1fa4f765c6062feaed140e1206993c303df739/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f62616b65726b7265747a6d61722f6c61726176656c2d6d6170626f782f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/bakerkretzmar/laravel-mapbox/?branch=master)[![Latest stable version](https://camo.githubusercontent.com/223c54b282a595d0a2dec5c36d43924d020860cf8dc0f4cc48f343409dcb44ac/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f62616b65726b7265747a6d61722f6c61726176656c2d6d6170626f782e7376673f7374796c653d666c6174)](https://packagist.org/packages/bakerkretzmar/laravel-mapbox)[![Total downloads](https://camo.githubusercontent.com/b89b3c1cb9cea5b64c6be722e8a4fb68dbe64a9e405a46b9e590d27d1bd24f14/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f62616b65726b7265747a6d61722f6c61726176656c2d6d6170626f782e7376673f7374796c653d666c6174)](https://packagist.org/packages/bakerkretzmar/laravel-mapbox)

A lightweight wrapper to make working with [Mapbox](https://docs.mapbox.com/api/maps) Maps service APIs in [Laravel](https://laravel.com) apps a breeze. Based on Matt Fox’s [`mapbox-api-laravel`](https://github.com/BlueVertex/mapbox-api-laravel).

This package supports managing the following services via the Mapbox API:

[Datasets](#datasets) • [Features](#features) • [Tilesets](#tilesets) • [Uploads](#uploads)

Installation
------------

[](#installation)

```
composer require bakerkretzmar/laravel-mapbox
```

Configuration
-------------

[](#configuration)

Add the following to your `.env` file:

```
MAPBOX_USERNAME={your Mapbox username}
MAPBOX_TOKEN={your Mapbox access token}
```

Optionally, you can publish the package’s config file:

```
php artisan vendor:publish --provider="bakerkretzmar\LaravelMapbox\LaravelMapboxServiceProvider"
```

Usage
-----

[](#usage)

### Datasets

[](#datasets)

[Mapbox documentation.](https://docs.mapbox.com/api/maps/#datasets)

**List Datasets:**

```
$datasets = Mapbox::datasets()->list();
```

**Retrieve a Dataset:**

```
$dataset = Mapbox::datasets($dataset_id)->get();
```

**Create a Dataset:**

```
$dataset = Mapbox::datasets()->create();
// or
$dataset = Mapbox::datasets()->create([
    'name' => 'My Dataset',
    'description' => 'A new Mapbox Dataset',
]);
```

**Update a Dataset:**

```
$dataset = Mapbox::datasets($dataset_id)->update([
    'name' => 'My Updated Dataset',
    'description' => 'An updated Mapbox Dataset',
]);
```

**Delete a Dataset:**

```
Mapbox::datasets($dataset_id)->delete();
```

### Features

[](#features)

[Mapbox documentation.](https://docs.mapbox.com/api/maps/#list-features)

**List Features:**

```
$features = Mapbox::datasets($dataset_id)->features()->list();
// or
$features = Mapbox::features($dataset_id)->list();
```

**Retrieve a Feature:**

```
$feature = Mapbox::datasets($dataset_id)->features($feature_id)->get();
// or
$feature = Mapbox::features($dataset_id, $feature_id)->get();
```

**Create or update a Feature:**

```
$feature = Mapbox::datasets($dataset_id)->features()->add($feature);
// or
$feature = Mapbox::features($dataset_id)->add($feature);
```

**Delete a Feature:**

```
Mapbox::datasets($dataset_id)->features($feature_id)->delete();
// or
Mapbox::features($dataset_id, $feature_id)->delete();
```

### Tilesets

[](#tilesets)

[Mapbox documentation.](https://docs.mapbox.com/api/maps/#tilesets)

**List Tilesets:**

```
$tilesets = Mapbox::tilesets()->list();
```

**Delete a Tileset:**

```
Mapbox::tilesets($tileset)->delete();
```

### Uploads

[](#uploads)

[Mapbox documentation.](https://docs.mapbox.com/api/maps/#uploads)

**Get temporary S3 credentials:**

```
$credentials = Mapbox::uploads()->credentials();
```

**Create an Upload:**

```
$upload = Mapbox::uploads()->create([
    'tileset' => 'my_tileset_name',
    'url' => 'http://{bucket}.s3.amazonaws.com/{key}',
    'name' => 'My Tileset',
]);
// or
$upload = Mapbox::uploads()->create([
    'tileset' => 'my_tileset_name',
    'dataset' => 'my_dataset_id',
    'name' => 'My Tileset',
]);
```

**Retrieve an Upload’s status:**

```
$upload = Mapbox::uploads($upload_id)->get();
```

**List Upload statuses:**

```
$uploads = Mapbox::uploads()->list();
```

**Delete an Upload:**

```
Mapbox::uploads($upload_id)->delete();
```

Testing
-------

[](#testing)

**Note** — Tests hit the real Mapbox API. Before testing the package, set up a local testing environment file with valid Mapbox credentials (`cp .env.testing.example .env.testing` and fill in the blanks).

```
composer test
```

Changelog
---------

[](#changelog)

See the [CHANGELOG](CHANGELOG.md) for information about what has changed recently.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

License
-------

[](#license)

This package is licensed under the MIT License (MIT). Please see the [LICENSE](LICENSE.md) for details.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~54 days

Total

4

Last Release

2356d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/49a7ea27b2815fb208a46e27bf867eb802bc951bb257ee5fa1097eaaf651d34e?d=identicon)[bakerkretzmar](/maintainers/bakerkretzmar)

---

Top Contributors

[![bakerkretzmar](https://avatars.githubusercontent.com/u/18192441?v=4)](https://github.com/bakerkretzmar "bakerkretzmar (28 commits)")[![mixaster](https://avatars.githubusercontent.com/u/3452655?v=4)](https://github.com/mixaster "mixaster (9 commits)")

---

Tags

laravellaravel-5-packagelaravel-packagemapboxmapbox-apilaravelmapbox

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bakerkretzmar-laravel-mapbox/health.svg)

```
[![Health](https://phpackages.com/badges/bakerkretzmar-laravel-mapbox/health.svg)](https://phpackages.com/packages/bakerkretzmar-laravel-mapbox)
```

###  Alternatives

[highideas/laravel-users-online

This package will provide an online users management.

203113.2k1](/packages/highideas-laravel-users-online)[stephenjude/filament-blog

Filament Blog Builder

20317.8k](/packages/stephenjude-filament-blog)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[datomatic/nova-detached-actions

A Laravel Nova tool to allow for placing actions in the Nova toolbar detached from the checkbox selection mechanism.

11229.2k](/packages/datomatic-nova-detached-actions)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
