You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class ProductData extends Data
{
publicfunction__construct(
publicstring$name,
publicstring$description,
publicstring$reference,
) {
}
publicfunctiondefaultWrap(): string
{
return'products';
}
}
reponse:
{
"current_page": 1,
"data": [
{
"name": "autem",
"description": "Rerum rerum et id qui exercitationem incidunt corporis.",
"reference": "9417542784724",
}
]
// rest of properties
}
✅ Expected behavior
{
"current_page": 1,
"products": [ // <- THIS
{
"name": "autem",
"description": "Rerum rerum et id qui exercitationem incidunt corporis.",
"reference": "9417542784724",
}
]
// rest of properties
}
🖥️ Versions
Laravel: 11.32
Laravel Data: 4.13
PHP: 8.2
The text was updated successfully, but these errors were encountered:
✏️ Describe the bug
I have "data" object in contoller that return data properly.
But when i try to create custom wrap name as documentation suggest, nothing changes.
↪️ To Reproduce
reponse:
✅ Expected behavior
🖥️ Versions
Laravel: 11.32
Laravel Data: 4.13
PHP: 8.2
The text was updated successfully, but these errors were encountered: