PHP code example of nihl / weatherreport

1. Go to this page and download the library: Download nihl/weatherreport 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/ */

    

nihl / weatherreport example snippets


# config/apikeys.php

return $apikeys = [
    "ipstack" => "your_ipstack_apikey",
    "openweather" => "your_openweathermap_apikey"
];

# .gitignore
config/apikeys.php

# config/navbar/header
return [
    "items" => [
        ...
        [
            "text" => "Weather",
            "url" => "weatherreport",
            "title" => "Weather report",
            "submenu" => [
                "items" => [
                    [
                        "text" => "Rest API",
                        "url" => "weatherreport/api",
                        "title" => "Weather report-API"
                    ],
                ],
            ],
        ],
    ],
];