rhyslees / nova-spark-overview
Interact with your Stripe subscriptions directly inside Nova.
Requires
- php: ^8.2
- laravel/nova: ^4.0
- laravel/pint: ^1.5
- laravel/spark-stripe: ^3.0
Requires (Dev)
- orchestra/testbench: ^8.0
- phpunit/phpunit: ^10
This package is auto-updated.
Last update: 2024-10-16 14:42:21 UTC
README
This Nova tool lets you:
- view a database subscription (subscription name is a parameter)
- view Stripe subscription details
- view invoices for a given subscription with a downloadable link
- change a subscription plan
- cancel a subscription
- resume a subscription
- avoid unnecessary Stripe API call when you load a resource to quickly get a status information and dive deeper if you need it
Default view of the subscription
Expanded view of the subscription
Disclaimer
This Package is an edited version of LimeDeck/nova-cashier-overview to allow spark plan integration.
LimeDeck/nova-cashier-overview was 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 rhyslees/nova-spark-overview
Next up, you use the resource tool with Nova. This is typically done in the fields
method of the desired Nova Resource.
use RhysLees\NovaSparkOverview\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 info@rhyslees.co.uk instead of using the issue tracker.
License
The MIT License (MIT). Please see License File for more information.