php - How to add meta data in laravel api resource - Stack Overflow

PHOTO EMBED

Thu Feb 16 2023 20:37:16 GMT+0000 (Coordinated Universal Time)

Saved by @mvieira #php

$data = Project::limit(100)->get();
return ProjectResource::collection($data)->additional(['some_id => 1']);
content_copyCOPY

https://stackoverflow.com/questions/70727830/how-to-add-meta-data-in-laravel-api-resource