Skip to content

Commit f95bc73

Browse files
committed
chore: update readme
1 parent f7d1ae5 commit f95bc73

1 file changed

Lines changed: 15 additions & 15 deletions

File tree

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@
88
<h1 align="center">Leaf Billing (Beta)</h1>
99

1010
<p align="center">
11-
<a href="https://packagist.org/packages/leafs/leaf"
11+
<a href="https://packagist.org/packages/leafs/billing"
1212
><img
13-
src="https://poser.pugx.org/leafs/leaf/v/stable"
13+
src="https://poser.pugx.org/leafs/billing/v/stable"
1414
alt="Latest Stable Version"
1515
/></a>
16-
<a href="https://packagist.org/packages/leafs/leaf"
16+
<a href="https://packagist.org/packages/leafs/billing"
1717
><img
18-
src="https://poser.pugx.org/leafs/leaf/downloads"
18+
src="https://poser.pugx.org/leafs/billing/downloads"
1919
alt="Total Downloads"
2020
/></a>
21-
<a href="https://packagist.org/packages/leafs/leaf"
21+
<a href="https://packagist.org/packages/leafs/billing"
2222
><img
23-
src="https://poser.pugx.org/leafs/leaf/license"
23+
src="https://poser.pugx.org/leafs/billing/license"
2424
alt="License"
2525
/></a>
2626
</p>
@@ -33,7 +33,7 @@ Leaf's billing system helps makers move faster by handling payments and subscrip
3333

3434
To get started, create a Stripe account and grab your API keys. Then, drop them into your `.env` file:
3535

36-
```env:no-line-numbers [Stripe]
36+
```env [Stripe]
3737
BILLING_PROVIDER=stripe
3838
STRIPE_API_KEY=sk_test_XXXX
3939
STRIPE_PUBLISHABLE_KEY=pk_test_XXXX
@@ -50,7 +50,7 @@ leaf install stripe
5050

5151
Billing on-the-fly is the fastest way to charge customers—ideal for one-time payments, donations, or services. Just generate a payment link with Leaf Billing, and we’ll handle the rest. You can do this using the `billing()` helper in your controller.
5252

53-
```php:no-line-numbers [MyController.php]
53+
```php
5454
...
5555

5656
public function handleCartPurchase($cartId) {
@@ -110,13 +110,13 @@ class CallbacksController extends Controller
110110

111111
Unlike one-time payments, subscriptions require a more structured setup—but Leaf Billing makes it effortless. Just run the `scaffold:subscriptions` command to instantly generate everything you need: billing config, controllers, routes, and views. You'll be up and running with subscriptions in minutes.
112112

113-
```bash:no-line-numbers
113+
```bash
114114
php leaf scaffold:subscriptions
115115
```
116116

117117
You then need to update the generated `config/billing.php` file with your subscription tiers under the `tiers` key:
118118

119-
```php:no-line-numbers [billing.php]
119+
```php
120120
...
121121
'tiers' => [
122122
[
@@ -177,19 +177,19 @@ You then need to update the generated `config/billing.php` file with your subscr
177177

178178
The `scaffold:subscriptions` command also generates a pricing component tailored to your chosen view engine—Blade, React, Vue, or Svelte. You can display your plans with just one line of code. The component is fully customizable, so you can tweak the design to match your app’s look and feel seamlessly.
179179

180-
```blade:no-line-numbers [Blade]
180+
```blade [Blade]
181181
@component('components.billing.pricing')
182182
```
183183

184-
```jsx:no-line-numbers [React]
184+
```jsx [React]
185185
import Pricing from '@/components/billing/pricing';
186186

187187
...
188188

189189
<Pricing />
190190
```
191191

192-
```vue:no-line-numbers [Vue]
192+
```vue [Vue]
193193
<script setup>
194194
import Pricing from '@/components/billing/pricing.vue';
195195
@@ -201,7 +201,7 @@ import Pricing from '@/components/billing/pricing.vue';
201201
</template>
202202
```
203203

204-
```svelte:no-line-numbers [Svelte]
204+
```svelte [Svelte]
205205
<script>
206206
import Pricing from '@/components/billing/pricing.svelte';
207207
</script>
@@ -213,7 +213,7 @@ import Pricing from '@/components/billing/pricing.svelte';
213213

214214
Once you’ve charged a customer—especially for a subscription—you’ll want to track their payment status. The best way to do this is through webhooks. When you run the `scaffold:subscriptions` command, Leaf Billing automatically generates a webhook controller that listens for events from your billing provider and handles them for you.
215215

216-
```php:no-line-numbers [WebhooksController.php]
216+
```php [WebhooksController.php]
217217
<?php
218218

219219
namespace App\Controllers\Billing;

0 commit comments

Comments
 (0)