add api linksehat/dashboard

This commit is contained in:
Muhammad Fajar
2022-10-25 18:13:02 +07:00
parent b0d74c222e
commit d0ce5772c2
6 changed files with 143 additions and 6 deletions

View File

@@ -0,0 +1,28 @@
<?php
namespace Modules\Linksehat\Transformers\Dashboard;
use Illuminate\Http\Resources\Json\JsonResource;
class ArticleResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request
* @return array
*/
public function toArray($request)
{
return [
'nID' => $this->nID,
'sSlug' => $this->sSlug,
'title' => $this->sJudulArtikel,
'deskripsi' => $this->sMetaDeskripsi,
'photos' => [
'title' => $this->sSlug,
'url' => $this->sImages
]
];
}
}