ResourceCollection.php 557 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace App\Http\Resources;
  3. use Illuminate\Http\Resources\Json\ResourceCollection as BaseResourceCollection;
  4. class ResourceCollection extends BaseResourceCollection
  5. {
  6. /**
  7. * Transform the resource collection into an array.
  8. *
  9. * @param \Illuminate\Http\Request $request
  10. * @return array
  11. */
  12. public function toArray($request)
  13. {
  14. return parent::toArray($request);
  15. }
  16. public function with($request)
  17. {
  18. return [
  19. 'code' => 200,
  20. 'message' => 'OK',
  21. ];
  22. }
  23. }