1. Go to this page and download the library: Download novius/laravel-nova-news 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/ */
novius / laravel-nova-news example snippets
// app/Providers/NovaServiceProvider.php
public function tools()
{
return [
// ...
new \Novius\LaravelNovaNews\LaravelNovaNews(),
];
}
// app/Nova/Post.php
namespace App\Nova;
use Laravel\Nova\Fields\Text;
class Post extends \Novius\LaravelNovaNews\Nova\NewsPost
{
public function mainFields(): array
{
return [
...parent::mainFields(),
Text::make('Subtitle'),
];
}
}