I'm trying to figure out how to properly structure request data into an array in my controller. I have 3 values coming from my http request and I'm trying to get two of them into a specific array structure. My request values are dumping so they are definitely there.
Here's my controller where I"m putting them into an array:
$subItems = array("title" => $request->itemTitle, "description" => $request->itemDesc);
But it's failing because the function I'm calling with the array $subItems is expecting an array structure where it can get the paramaters by the index of title and description like this:
[ $subtask['title'], $subtask['description']]
How do I need to change my controller/array code to accomplish this?