PHP code example of kregel / nova-weather-cards
1. Go to this page and download the library: Download kregel/nova-weather-cards 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/ */
kregel / nova-weather-cards example snippets
// in app/Providers/NovaServiceProvider.php
// ...
public function cards()
{
return [
// ...
(new \Kregel\NovaWeatherCards\Weather)->withMeta([
'name' => 'San Francisco',
'coords' => [
37.7749,
122.4194,
]
]),
// If you don't define coordinates it will default to your location.
(new \Kregel\NovaWeatherCards\Weather)->withMeta([
'name' => 'Current location',
]),
// Or you could forego all configuration. (which will default to no title, and your current location)
new \Kregel\NovaWeatherCards\Weather,
];
}