kanuu-io / kanuu-laravel
Integrate Kanuu to your Laravel application
Installs: 418
Dependents: 0
Suggesters: 0
Security: 0
Stars: 19
Watchers: 3
Forks: 3
Open Issues: 2
pkg:composer/kanuu-io/kanuu-laravel
Requires
- php: ^8.0
- ext-json: *
- ext-openssl: *
- guzzlehttp/guzzle: ^7.0.1
- illuminate/contracts: ^8.0|^9.0
Requires (Dev)
- orchestra/testbench: ^6.0
- phpunit/phpunit: ^9.3
README
🛶 Quickly integrate your Laravel application with Kanuu in 3 simple steps.
Installation
composer require kanuu-io/kanuu-laravel
Documentation
📚 Read the full documentation at docs.kanuu.io
Basic usage
1. Add your Kanuu API key to your .env file.
KANUU_API_KEY="YOUR_API_KEY"
2. Add a route to your routes/web.php that will redirect your user to Kanuu based on a unique identifier.
use Kanuu\Laravel\Facades\Kanuu; // ... Kanuu::redirectRoute()->name('kanuu.redirect');
3. Add a "Manage your subscription" button that uses that route.
<a href="{{ route('kanuu.redirect', $user) }}" class="..."> Manage your subscription </a>
Note that your can use any identifier you want as long as it's unique throughout your application. For example, if you want to provide team-based subscription, you can use route('kanuu.redirect', $team) or route('kanuu.redirect', $team->uuid).
And that's it! ✨
Advanced usage
Kanuu's package provide a lot more for you to get started using Kanuu and Paddle. This includes:
- A
HandleWebhookControllerthat takes care of both handling Paddle's webhooks and verifying their signature. - A
kanuu:publishcommand that provides all the boilerplate you need to get started with billing.
Full documentation available at docs.kanuu.io
License
The MIT License (MIT). Please see License File for more information.