eloquent/liberator
Auto-generate RESTful CRUD controllers, routes, and API resources for Laravel apps from Eloquent models. Liberator helps you scaffold consistent endpoints quickly, reducing boilerplate while keeping generated code editable and aligned with your existing models and conventions.
eloquent/liberator) is a proxy-based workaround to bypass PHP’s strict access modifiers (e.g., private/protected properties/methods) in Eloquent models or other classes. This is niche and primarily useful in legacy systems or edge cases where:
$casts, $appends, HasApiTokens) or packages like spatie/laravel-activitylog (for auditing) may suffice without proxies.composer require eloquent/liberator), but usage requires intentional design decisions (e.g., wrapping Eloquent models with proxies).| Risk Area | Severity | Mitigation |
|---|---|---|
| Security | High | Proxies expose internal state; risk of injection or unintended side effects. |
| Maintenance | High | Abandoned package; no bug fixes for PHP/Laravel updates. |
| Performance | Medium | Runtime proxies add indirection overhead (minimal but measurable in loops). |
| Compatibility | Critical | No Laravel 10+ testing; may break with new features (e.g., model macros). |
| Design Debt | High | Encourages anti-patterns (bypassing encapsulation). |
README or architecture decision record (ADR).#[Spatie\LaravelModelGenerator]).league/glide).protected/private members).fillable mass assignment").Call to private method via proxy).| Failure Scenario | Likelihood | Impact | Mitigation |
|---|---|---|---|
| Laravel 10+ breaks proxy logic | High | Runtime errors in production. | Feature flags; rewrite proxies if needed. |
| Proxy leaks internal state | Medium | Security vulnerabilities. | Audit proxy usages; restrict to trusted code. |
| Performance degradation | Medium | Slow endpoints. | Benchmark; limit proxy scope. |
| IDE/static analysis false positives | High | Developer frustration. | Document exceptions in .phpstan.neon. |
How can I help you explore Laravel packages today?