swooinc/nova-countdown

A countdown card for Laravel Nova.
24,555 12
Install
composer require swooinc/nova-countdown
Latest Version:v1.0.4
PHP:>=7.1.0
License:MIT
Last Updated:Apr 10, 2024
Links: GitHub  ·  Packagist
Maintainer: ChinLeung

Nova Countdown

A countdown card for Laravel Nova.

Installation

Install the package with composer using the following command:

composer require swooinc/nova-countdown

Usage

You can pass a Carbon instance for the countdown.

<?php

namespace App\Nova;

use Swooinc\NovaCountdown\NovaCountdown;

class User extends Resource
{
    // Other methods
    
    /**
     * Get the cards available for the request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return array
     */
    public function cards(Request $request)
    {
        return [
            (new NovaCountdown)
                ->to(now()->addDays(30))
                ->label('30 Days Later'),
        ];
    }
}

License

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

Related Packages

stepanenko3/nova-cards

A Laravel Nova info cards.

155,009 33
annaghd/php-credit-card-validator-plus

Validates popular debit and credit cards numbers against regular expressions and...

13,523 1
inacho/php-credit-card-validator

Validates popular debit and credit cards numbers against regular expressions and...

1,440,915 208
unm/laravel4-opencloud

A laravel 4.1 service provider package that wraps the Rackspace/Openstack PHP SD...

4 7
dev-labs/php-credit-card-validator

Validates popular debit and credit cards numbers against regular expressions and...

0 0