class Illuminate / Contracts / Database / ModelIdentifier
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.

ModelIdentifier

Properties

public

$class string

The class name of the model.

Default: null
public

$id mixed

The unique identifier of the model.

This may be either a single ID or an array of IDs.

Default: null
public

$relations array

The relationships loaded on the model.

Default: null
public

$connection string|null

The connection name of the model.

Default: null
public

$collectionClass string|null

The class name of the model collection.

Default: null

Methods

public

__construct ( $class , $id , array $relations , $connection ) : void

Create a new model identifier.

Parameters

  • $class string
  • $id mixed
  • $relations array
  • $connection mixed
public

useCollectionClass ( string $collectionClass ) : $this

Specify the collection class that should be used when serializing / restoring collections.

Parameters

  • $collectionClass string|null