oriondevelops/nova-greeter

A Laravel Nova greeter card.

Installs: 10 204

Dependents: 0

Suggesters: 0

Security: 0

Stars: 6

Watchers: 1

Forks: 3

Open Issues: 2

Language:Vue

v0.0.2 2024-08-02 09:32 UTC

This package is auto-updated.

Last update: 2024-11-02 10:12:46 UTC


README

Latest Version on Packagist Total Downloads

This Laravel Nova package adds a customizable greeting card to your dashboard.

basic

Installation

You can install the package via composer:

composer require oriondevelops/nova-greeter

Usage

Register the card in your preferred dashboard:

use Orion\NovaGreeter\GreeterCard;

// ...

public function cards()
{
    return [
        // ...
        GreeterCard::make()
            ->user(name: 'John Doe', title: 'The King in the North')
            ->avatar(url: 'https://ui-avatars.com/api/?size=300&color=7F9CF5&background=EBF4FF&name=John+Doe'),
    ];
}

Message

->message(text: 'Welcome back,')

Button

->button(name: 'Call To Action', target: '/nova/resources/users')

Avatar

->avatar(url: $avatarUrl ?? $placeholderAvatarUrl)

verified-example

Verified

->verified(text: 'Verified Account')

Example

example

GreeterCard::make()
    ->user(name: 'ORION', title: 'Admin')
    ->message(text: 'Welcome back,')
    ->button(name: 'See users', target: '/nova/resources/users')
    ->avatar(url: 'https://avatars.githubusercontent.com/u/39307250')
    ->width('1/2'),

Localization

The translation file can be published using the following command:

php artisan vendor:publish --provider="Orion\NovaGreeter\CardServiceProvider"

Credits

License

The MIT License (MIT). Please see License File for more information.