Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace App\Http\Resources;
- use Illuminate\Http\Resources\Json\JsonResource;
- class BalasResource extends JsonResource
- {
- /**
- * Transform the resource into an array.
- *
- * @param \Illuminate\Http\Request $request
- * @return array
- */
- public function toArray($request)
- {
- // return parent::toArray($request);
- return [
- 'id' => $this->id,
- 'reply' => $this->body,
- // 'user' => $this->user->name,
- 'created_at' => $this->created_at
- ];
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement