songs2serve / nova-lens-card
Add table cards to your Laravel Nova 3 dashboard by using your existing Lenses.
Installs: 929
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/songs2serve/nova-lens-card
Requires
- php: >=7.4.0
This package is auto-updated.
Last update: 2024-08-22 09:58:28 UTC
README
Turn your Laravel Nova 3 lenses into summary cards.
Installation
composer require songs2serve/nova-lens-card
Usage
Add a card on your Nova dashboard:
namespace App\Providers; use App\Models\Song; use Songs2Serve\NovaLensCard\LensCard; class NovaServiceProvider extends NovaApplicationServiceProvider { protected function cards() { return [ new LensCard(new MyLens(), Song::class), ]; } }
Add a card on a resource overview:
namespace App\Nova; use Songs2Serve\NovaLensCard\LensCard; class Song extends Resource { protected function cards() { return [ new LensCard(new MyLens()), ]; } }
The amount of records can be customized by calling the limit() method.