whitecube / nova-flexible-content

Flexible Content & Repeater Fields for Laravel Nova
MIT License
780 stars 229 forks source link

How do I return full URL of uploaded media in JSON response #462

Open Kreshnik opened 1 year ago

Kreshnik commented 1 year ago

Hello,

In a GET API request, I need to return a JSON response of the flexible content, including all uploaded media files with their absolute path, some images have been uploaded using the spatie media library.

Is there an easy way I could do that? (Posts::all()->withLayouts()->toJson())