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())
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()
)