- What Laravel versions does rinvex/laravel-support support?
- The package is designed for Laravel 8+, but may require manual testing for Laravel 10+ due to its archived status. Check for breaking changes in validation rules or controller dependencies, especially if using newer Laravel features like read-only properties.
- How do I install rinvex/laravel-support in my Laravel project?
- Run `composer require rinvex/laravel-support` in your project root. The package integrates via Composer autoloading and doesn’t require additional configuration unless you’re using its traits or validator rules.
- Does this package work with PHP 8.2+?
- Yes, it likely supports PHP 8.2+ since it targets PHP 8.0+. However, avoid using PHP 8.2+ features (e.g., new attributes) if the package doesn’t explicitly support them, as it’s archived and may not be updated.
- What’s the `unique_with` validator rule, and how do I use it?
- The `unique_with` rule validates multi-column UNIQUE database constraints, similar to Laravel’s built-in `unique` but with additional flexibility. Use it like `validate('field', 'unique_with:table,column1,column2')` in Form Requests or controllers.
- Can I use this package in a microservices architecture?
- No, this package is better suited for monolithic Laravel apps or tightly coupled modules. Its traits and contracts introduce shared dependencies, which may violate microservices principles like loose coupling and single responsibility.
- Will this package break if Laravel updates its validation system?
- Potential risk exists due to its archived status. Test thoroughly in a staging environment, especially if using custom validator rules or controller traits. Consider forking or patching locally if compatibility issues arise.
- Are there alternatives to rinvex/laravel-support for shared validation?
- Yes, consider `spatie/laravel-validation` for advanced rules, `laravel-shift/blueprint` for reusable controllers, or Laravel’s built-in Form Requests. These packages are actively maintained and may offer better long-term compatibility.
- How do I avoid tight coupling with the included controller trait?
- Use composition over inheritance. Instead of extending the trait directly, create a wrapper class or use the decorator pattern. For example, inject the trait’s logic via dependency injection to maintain flexibility.
- Does this package include database migrations or schema tools?
- No, it doesn’t interact directly with databases. However, its `unique_with` validator assumes Eloquent models with standard timestamps (e.g., `created_at`, `updated_at`). Customize or extend the rule if your schema differs.
- Why is rinvex/laravel-support archived, and should I still use it?
- The package is archived but not abandoned—it’s primarily a support library for other Rinvex packages. Use it if you need its specific helpers (e.g., `mimetypes()`, `timezones()`) or validator rules, but be aware of potential breaking changes. Fork it if maintenance becomes critical.