trait InteractsWithDictionary (View source)

Methods

string|int|null
getDictionaryKey(mixed $attribute)

Get a dictionary key attribute - casting it to a string if necessary.

Details

protected string|int|null getDictionaryKey(mixed $attribute)

Get a dictionary key attribute - casting it to a string if necessary.

Parameters

mixed $attribute

Return Value

string|int|null

Exceptions

InvalidArgumentException

Laravel Cloud is the best place to deploy Laravel, Nuxt, Express, Hono, Node.js, Bun, Go, Flask, Python, and more, with dedicated infrastructure available on AWS through Laravel Private Cloud.