first commit
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Resources\Sanggahan;
|
||||
|
||||
use Illuminate\Http\Resources\Json\ResourceCollection;
|
||||
|
||||
class SanggahanCollection extends ResourceCollection
|
||||
{
|
||||
/**
|
||||
* Transform the resource collection into an array.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
|
||||
*/
|
||||
public function toArray($request)
|
||||
{
|
||||
return [
|
||||
'code' => 200,
|
||||
'status' => 'success',
|
||||
'message' => 'Berhasil mengambil data',
|
||||
'data' => SanggahanResource::collection($this->collection)
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user