PHP code example of kregel / nova-news-card
1. Go to this page and download the library: Download kregel/nova-news-card 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-news-card example snippets
// in app/Providers/NovaServiceProvider.php
// ...
public function cards()
{
return [
// ...
(new \Kregel\NovaNewsCard\News)->withMeta([
'from' => \Carbon\Carbon::now()->subDays(5),f
]),
// If you don't define coordinates it will default to your location.
(new \Kregel\NovaNewsCard\News)->withMeta([
'name' => 'Current location',
]),
// Or you could forego all configuration. (which will default to no title, and your current location)
new \Kregel\NovaNewsCard\News,
];
}