Iterating $request

Posted 1 year ago by Aiden-IPI

May I know what is the proper way to iterate the $request->all()?

I tried the following method,

foreach($request->all() AS $index => $field) {
  # Return null
  dd($field);

  # Return null
  dd($index);

  # Return null
  dd($field[$index]);

  # Return null
  dd($request->input($index));
}

Please sign in or create an account to participate in this conversation.