Skip to main content

Blade Components

Subscribd’s Blade components are static, non-reactive alternatives to the Livewire components. Use them when you don’t need server-side reactivity — for example, in read-only views, emails, or contexts where Livewire is not loaded. All Blade components are prefixed with x-subscribd-.

x-subscribd-plan-card

Renders a single plan card with name, price, interval, and feature list.
<x-subscribd-plan-card :plan="$plan" />
Pass a custom CTA button via the action slot:
<x-subscribd-plan-card :plan="$plan">
    <x-slot name="action">
        <form action="{{ route('subscribe', $plan) }}" method="POST">
            @csrf
            <button type="submit">Subscribe</button>
        </form>
    </x-slot>
</x-subscribd-plan-card>

x-subscribd-plan-grid

Renders a full plan comparison grid for all active plans.
<x-subscribd-plan-grid />
Limit to specific plan keys:
<x-subscribd-plan-grid :plans="['starter', 'pro', 'enterprise']" />

x-subscribd-subscription-badge

A status badge for the current subscription. Renders the subscription status as a coloured pill — for example, “Active”, “Trial”, or “Grace Period”.
<x-subscribd-subscription-badge :subscription="$subscription" />
When no subscription is passed, the component resolves the authenticated user’s default subscription automatically.

x-subscribd-trial-status

Shows trial status text and days remaining.
<x-subscribd-trial-status />

<x-subscribd-trial-status :subscription="$subscription" />

x-subscribd-invoice-history

Renders a non-paginated invoice table. Best for dashboards showing the most recent invoices.
{{-- Show last 5 invoices --}}
<x-subscribd-invoice-history :per-page="5" />
A PDF download link for a single invoice.
<x-subscribd-invoice-link :invoice="$invoice">
    Download PDF
</x-subscribd-invoice-link>

Publishing and overriding views

php artisan vendor:publish --tag=subscribd-views
Published views land in resources/views/vendor/subscribd/components/. Any published file overrides the package default.

Next steps