ekyna/resource
Laravel package providing a Resource layer with controllers, forms, validation, persistence and admin-style CRUD tooling. Helps structure domain resources consistently across your app and speeds up building back-office interfaces.
Resource classes.Illuminate\Http\Resources\Json\JsonResource, but may offer additional features (e.g., nested resource handling, custom metadata).return new self($data) syntax, arrow functions, etc.).spatie/array-to-xml, fruitcake/laravel-cors).JsonResource, vinkla/hashids, or spatie/laravel-activitylog)?App\Http\Resources\UserResource).JsonResource implementations.User, Product).UserResource with posts relationship).pdo, mbstring are likely required but standard).JsonResource usage.JsonResource with ekyna/resource in one module at a time.response()->json($resource)).| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Package breaks with Laravel upgrade | API responses fail silently. | Pin version in composer.json. |
| Undocumented serialization bug | Inconsistent client data. | Add validation layer (e.g., JSON Schema). |
| Circular reference crash | 500 errors in nested resources. | Use ->except() or custom logic. |
| Team misuses the package | Inconsistent API contracts. | Enforce via pull request reviews. |
JsonResource).How can I help you explore Laravel packages today?