PHP code example of mrgswift / mapbox-api-laravel

1. Go to this page and download the library: Download mrgswift/mapbox-api-laravel library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mrgswift / mapbox-api-laravel example snippets


// Laravel: config/app.php
BlueVertex\MapBoxAPILaravel\MapBoxAPILaravelServiceProvider::class

// bootstrap/app.php:
$app->register(BlueVertex\MapBoxAPILaravel\MapBoxAPILaravelServiceProvider::class);

$app->withFacades(true, [
    'BlueVertex\MapBoxAPILaravel\Facades\Mapbox' => 'Mapbox'
]);

// Options array is optional
$list = Mapbox::tilesets()->list([
	'type' 			=> 'raster',
	'visibility' 	=> 'public',
	'sortby' 		=> 'modified',
	'limit' 		=> 500
]);

// Returns S3Credentials Object
$response = Mapbox::uploads()->credentials();