- Does lacodix/laravel-plans support Laravel 13, and what if I’m still on Laravel 12?
- Yes, this package officially supports Laravel 13 (PHP 8.2+). If you’re on Laravel 12 or earlier, you can downgrade to v1.2.0 or manually backport changes, though upgrading is recommended for long-term compatibility. Check the [README](https://github.com/lacodix/laravel-plans) for migration notes.
- Can I use this package for plan management without features (e.g., just subscriptions)?
- Absolutely. The package is modular—you can use it solely for plans and subscriptions while ignoring features entirely. Features are optional, so you’re not forced to implement them if they don’t fit your SaaS model.
- How do I handle countable features like API tokens or credits across multiple plans?
- The package supports countable features with auto-resets (e.g., monthly credits). You define limits per plan, and usage is tracked per subscription. Features can also be split across plans based on subscription order. Refer to the [documentation](https://www.lacodix.de/docs/laravel-plans) for implementation details.
- Does this package integrate with Stripe or other payment gateways for billing?
- No, this package focuses on plan/subscription management and feature tracking, not billing or invoicing. You’ll need to integrate a separate billing system (e.g., Stripe, PayPal) and sync webhooks manually. The package provides metadata fields to store billing-related data like currency or pricing.
- How do I migrate existing plan/subscription data to lacodix/laravel-plans?
- The package doesn’t include built-in migration tools, but you can manually map your existing data to the `plans`, `features`, and `subscriptions` tables. Use Laravel’s Eloquent to seed initial data or write custom migrations. The schema is straightforward and well-documented.
- Can I translate plan names or feature descriptions for multilingual SaaS apps?
- Yes, the package leverages [spatie/laravel-translatable](https://github.com/spatie/laravel-translatable) to support translations. Plans and features are identified by slugs but can display localized names/descriptions to users. Ensure you configure the translatable fields during setup.
- What happens if a user exceeds their feature limits (e.g., runs out of API tokens)?
- The package tracks consumption and allows you to define behavior for exceeded limits (e.g., disable features, log errors, or notify users). You’ll need to implement custom logic in your application to handle these cases, such as throwing exceptions or triggering events.
- Are there performance concerns for high-traffic SaaS apps with many subscriptions?
- The package is optimized for MySQL/PostgreSQL and uses Eloquent, but high-load scenarios (e.g., thousands of concurrent subscriptions) may require additional optimizations like queue-based event processing. Test under your expected traffic before production deployment.
- Does this package conflict with Laravel Cashier or Spatie’s Laravel-Permission?
- No direct conflicts, but test thoroughly. Laravel Cashier (for Stripe) can coexist if you use this package for plan management and Cashier for billing. Spatie’s Laravel-Permission may require custom logic if you tie permissions to plans/features, but they’re independent systems.
- How do I handle webhooks from payment gateways (e.g., Stripe) to update subscriptions?
- The package doesn’t include webhook handling—you’ll need to write custom logic to listen for gateway events (e.g., subscription cancellations, upgrades) and update subscriptions via the package’s API. Use Laravel’s event system or queue jobs to process updates asynchronously.