LimeDeck / nova-cashier-overview

Interact with your Stripe subscriptions directly inside Nova.
MIT License
28 stars 18 forks source link
cashier laravel nova novapackage stripe

A Laravel Nova resource tool to manage your Cashier (Stripe) subscriptions

Latest Version on Packagist CircleCI StyleCI Total Downloads

This Nova tool lets you:

Default view of the subscription

screenshot of the initial Cashier overview tool

Expanded view of the subscription

screenshot of the expanded Cashier overview tool

Disclaimer

This package has been heavily inspired by themsaid/nova-cashier-manager and was created to be in sync with latest changes in Cashier as well as to optimize default loads by avoiding a Stripe API request unless it's needed. Structure of this repository was inspired by spatie/skeleton-nova-tool.

Installation

You can install the nova tool in to a Laravel app that uses Nova via composer:

composer require limedeck/nova-cashier-overview

Next up, you use the resource tool with Nova. This is typically done in the fields method of the desired Nova Resource.

use LimeDeck\NovaCashierOverview\Subscription;

// ...

public function fields(Request $request)
{
    return [
        ID::make()->sortable(),

        ...

        Subscription::make(),

        // if you want to display a specific subscription or multiple
        Subscription::make('a-fancy-subscription-name'), 

        ...
    ];
}

Testing

composer test

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email rudolf@limedeck.io instead of using the issue tracker.

License

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