GetStateUsing - when can it be used? One example that works, one that doesn't
Hi all, GetStateUsing - have found this useful - here is an example of it being used to retrieve the description from an array - and this works beautifully
In this case we are displaying the name of a file and underneath (in the description) pulling the name of the folder based on its entry in an array
$folders
I thought that I could make the folder name itself a column by doing this
When I run this version the browser just hangs eventually saying it's unable to get a response - and the php http server will not respond to any other requests until I kill & restart it.
Is my use of GetStateUsing in example 2 incorrect?
No errors reported in storage/logs/laravel.log nor in the php http server output.
thanks - not critical (I can workaround) but thought I'd flag it to see if it's my error or ...,
j4 Replies
Sounds like you are running in a loop somehow, but I don't know why.
I'd try it this way:
I think you can't inject
$state
in getStateUsing
, use $record
insteadOh yeah. That makes sense and is probably the cause of the loop.
$state
trying to getStateUsing()
trying to get $state
...I'll take a look and report back my findings to confirm - thanks Leandro & Dennis