- How do I install isapp/laravel-cart in a Laravel application?
- Install the package with composer require isapp/laravel-cart. Then publish the configuration and migrations using the package's vendor:publish tags, and run php artisan migrate if you plan to use database storage. The README documents separate publish steps for config and migrations.
- Does isapp/laravel-cart support guest carts and authenticated users?
- Yes. The package advertises guest and authenticated user support and exposes methods such as getUser, setUser, and setGuard for controlling the active user and authentication guard. You can set a specific user for admin operations or impersonation and then chain cart actions.
- Should I use database or session storage for a Laravel shopping cart?
- Database storage gives you persistent cart records, while session storage keeps cart data in the session and can be simpler for guest carts but may be less suitable for high-traffic sites. The package supports both, but no benchmarks are provided, so test latency and concurrency for your workload before choosing.
- Which Laravel versions does isapp/laravel-cart support?
- Release 1.0.1 adds Laravel 13 compatibility through illuminate/support ^13. Check the package composer.json to confirm whether that constraint is exclusive or ORed with older Laravel versions, because an exclusive constraint would make the release suitable only for Laravel 13 applications. Older Laravel apps may need to pin a previous compatible release or plan a framework upgrade.
- How do I publish the config and migrations for isapp/laravel-cart?
- Use php artisan vendor:publish with the CartServiceProvider and the config tag to create config/laravel-cart.php, then run the same command with the migrations tag to copy migration files into database/migrations. After publishing, run php artisan migrate to create the cart tables.
- How are prices calculated in isapp/laravel-cart?
- The package advertises high precision price calculations, but the provided README excerpt does not document the exact decimal or rounding strategy. Review the configuration and source to confirm behavior, and write tests for totals, taxes, and discounts in your application.
- Can I customize the cart model, table, or pricing logic in isapp/laravel-cart?
- You can customize package settings in the published config/laravel-cart.php file, and the package is described as highly customizable. For non-standard pricing logic or model expectations, you may need to extend base classes, override services, or adapt your Product and Order models to the package's Eloquent associations. Keeping customizations behind an internal cart service can reduce vendor lock-in.
- How do I test a Laravel shopping cart built with isapp/laravel-cart?
- No built-in test suite or examples are evidenced by the release notes, so plan to write integration tests for cart behavior yourself. Cover session and database persistence, guest versus authenticated carts, price calculations, exception handling, and the Laravel version you deploy. Run Composer dependency checks before committing to release 1.0.1.
- Is isapp/laravel-cart production-ready or actively maintained?
- The provided assessment reports very low adoption, including zero stars and dependents, which raises concerns about long-term maintenance and hidden bugs. Release 1.0.1 is a compatibility update, not evidence of broad production maturity. Mitigate risk by pinning versions, running a proof of concept on your Laravel version, and having a fallback cart implementation such as Redis.
- Are there alternatives to isapp/laravel-cart for Laravel e-commerce carts?
- The provided materials do not name specific alternatives, so evaluate other Laravel cart packages against your requirements for storage, pricing precision, and maintenance activity. If you adopt isapp/laravel-cart, wrap its calls in an internal cart service so you can switch to a Redis-based or custom implementation later.