⏫
Upgrading from 4.x

Livewire

This version now has Livewire support thanks to Atila Silva's Pull Request.

Install Command

Livewire was freshly introduced to this version and specifying the stack is no longer needed. The package will use the jetstream.php's stack value to determine what to install, so it's important to install Jetstream and publish Jetstream assets before diving in and installing Cashierstream.
The command no longer needs the stack argument, so you can directly install the Cashier stack:
1
# Old behavior
2
php artisan billing-portal:install inertia stripe
3
​
4
# Current behavior
5
php artisan billing-portal:install stripe
Copied!

Authorization

You may configure the authorization validation for your users when accessing the portal. Read the documentation about authorization.
Make sure that the config/billing-portal.php's middleware configuration adds the middleware needed for authorization:
1
return [
2
​
3
'middleware' => [
4
// ...
5
​
6
\RenokiCo\BillingPortal\Http\Middleware\Authorize::class,
7
],
8
​
9
// ...
10
11
];
Copied!

Webhooks

Webhooks are already integrated with Cashierstream. The configuration was made to be flexible and change the path and the controller class used by the route. Read more about the installation process for the webhooks ↗​
Append the following config to config/billing-portal.php.
1
<?php
2
​
3
return [
4
​
5
// ...
6
7
/*
8
|--------------------------------------------------------------------------
9
| Webhook Controller
10
|--------------------------------------------------------------------------
11
|
12
| The router settings for the webhook endpoints.
13
| This is being prefixed by the prefix key that was configured above.
14
|
15
*/
16
17
'webhooks' => [
18
​
19
'middleware' => [
20
//
21
],
22
​
23
​
24
'stripe' => [
25
​
26
'path' => '/stripe/webhook',
27
​
28
'class' => \RenokiCo\BillingPortal\Http\Controllers\StripeWebhook::class,
29
​
30
],
31
​
32
],
33
];
Copied!
Copy link
Edit on GitHub