- What Laravel versions does this package support?
- This package is designed for Laravel applications using PHP 8.4 or higher. It leverages modern Laravel features like migrations and Doctrine for database management, so ensure your project meets these requirements before installation.
- How do I install and configure the package?
- Run `composer require baks-dev/users-profile-balance` to install. Then execute `php bin/console baks:assets:install` to set up configuration and assets. Add the auto-script commands to your `composer.json` for seamless post-install/post-update execution.
- Does this package work with existing user models?
- Yes, the package is built to integrate with your existing user models. It adds balance-related fields and logic without requiring you to modify your core user model structure, making it a drop-in solution for most Laravel applications.
- How do I handle database migrations for this package?
- Run `php bin/console doctrine:migrations:diff` to generate migration files, then execute `php bin/console doctrine:migrations:migrate` to apply them. The package includes all necessary schema changes for balance tracking in a single migration step.
- Can I test the package’s functionality before deploying to production?
- Yes, you can run tests specific to this package using `php bin/phpunit --group=users-profile-balance`. This ensures the balance logic, database interactions, and core features work as expected in your environment.
- Is this package suitable for multi-currency balance tracking?
- Currently, the package focuses on single-currency balance tracking. If you need multi-currency support, you may need to extend the package or consider alternatives like Spatie’s financial packages, which offer more advanced currency handling.
- How do I clear the package’s cache after updates?
- Use the provided Artisan command `php bin/console baks:cache:clear` to clear the package’s cache. This is especially useful after updates or when you encounter unexpected behavior due to cached configurations.
- Are there any known conflicts with other Laravel packages?
- The package is designed to be lightweight and modular, minimizing conflicts. However, if you’re using other financial or user-related packages, test thoroughly to ensure compatibility, particularly with packages that modify the same database tables or user model.
- What if I need to customize the balance logic or add new features?
- The package follows Laravel’s conventions, so you can easily extend its functionality by publishing and modifying its configuration files. Override the provided migrations, services, or controllers to tailor the balance logic to your needs.
- Is this package actively maintained and secure?
- The package is MIT-licensed and appears to be actively maintained, with recent updates and a clear roadmap. Always review the release notes and changelog for security patches or breaking changes, especially before deploying to production.