PHP code example of infinityxtech / filament-world-map-widget
1. Go to this page and download the library: Download infinityxtech/filament-world-map-widget 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/ */
infinityxtech / filament-world-map-widget example snippets
php artisan make:filament-map-widget MapWidget
public function stats () {
return [
'US' => 35000,
'RS' => 15000
];
}
public function heading ():string|Htmlable|null {
return 'World Map';
}
public function tooltip ():string|Htmlable {
return 'stats';
}
public function map ():Map {
return Map::WORLD;
}
public function color ():array {
return [0, 120, 215]; // rgb value
}
public function height ():string;
public function additionalOptions ():array {
return [];
}