class Illuminate / Http / Resources / Json / AnonymousResourceCollection
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.

AnonymousResourceCollection

Extends

Properties

public

$collects string

The name of the resource being collected.

Default: null
public

$preserveKeys bool

Indicates if the collection keys should be preserved.

Default: false

Methods

public

__construct ( $resource , $collects ) : void

Create a new anonymous resource collection.

Parameters

  • $resource mixed
  • $collects string