get element of array, not index
How can I get the element of the index of the array of a select. The $state only returns the index of the array but I also need the element . For example, the values are: [
'A' => 'Example 1',
'B' => 'Example 2'
].
I want to get "Example 1", but I don't want to modify 'A', otherwise I would put something like 'Example 1' => 'Example 1'.
2 Replies
Job::find($state)->name
thanks you