gergonzalez/lumen-fractal
Lumen service provider integrating League Fractal for clean API responses. Adds transformers/serializers support to format Eloquent data into consistent JSON structures, with simple configuration and container bindings for quick setup in Lumen microservices.
league/fractal), making this package redundant unless Lumen-specific features (e.g., PSR-7 middleware hooks) are critical.league/fractal (stable) and Lumen (long-term support unclear post-Laravel 10)./health, /docs)./users, /orders) with feature flags.json_encode).league/fractal version matches package expectations (e.g., ^0.15).illuminate/support if using Laravel helpers).composer.json.bootstrap/app.php.UserTransformer, OrderTransformer).$app->group(['middleware' => 'fractal'], function ($app) {
$app->get('/users', 'UserController@index');
});
fractal-cache package).// Fails if $user->profile is null
$this->attribute('profile', function ($user) {
return $user->profile->name; // Throws ErrorException
});
league/fractal to a specific version.How can I help you explore Laravel packages today?