mattmangoni / nova-recent-posts
A simple recent blog posts card for Laravel Nova.
Requires
- php: >=7.1.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is not auto-updated.
Last update: 2025-07-06 10:12:56 UTC
README
What is this package about?
This will add a simple full width card in your dashboard with a list of recent posts.
You obviously need to have a basic blogging system already setup in order to use this.
It just need a posts table and a with at least title column in it and a one-to-many relationship with the user.
Both the posts model and the relationship name - as well as other parameters - can be altered from the card constructor.
Installation
You can install the package in to a Laravel app that uses Nova via composer:
composer require mattmangoni/nova-recent-posts
Next, you must register the card with Nova. This is typically done in the cards method of the NovaServiceProvider.
// in app/Providers/NovaServiceProvder.php // ... public function cards() { return [ // ... // all the parameters are optional new \Mattmangoni\RecentPosts\RecentPosts( string $authorRelationName = 'user', string $dateFormat = 'Y-m-d', int $postsNumber = 5, string $postModel = 'App\Post', string $userUriKey = 'users' ), ]; }