-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
I like to now and user the transformer to transform objects inline ready for sending like the following. Unfortunately a request object is required for the parseFractalIncludes method and is throwing an error.
Example:
GET /authentication/status
{
authenticated: true
user: {
data: {
# Transformed data here #
}
}
}
My code
$authenticated = (bool) ($user = API::user());
if ($authenticated)
{
$user = app('dingo.api.transformer')->transform($user);
}
return compact('authenticated', 'user');
Metadata
Metadata
Assignees
Labels
No labels