Skip to content

Turn your Nova 3 lenses into summary cards.

License

Notifications You must be signed in to change notification settings

songs2serve/nova-lens-card

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nova Lens Card

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.