Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

dib258's avatar
Level 11

Converting Illuminate\Http\Request to array

I'm making in use of a library that expects to receive a native PHP array such as is obtained from the global $_REQUEST.

Unfortunately in this instance, the Illuminate\Http\Request is an object, and seems to have quite a different structure to the native php array. Is there a method to convert that object to the same array that would be obtained via '$_REQUEST' (which doesn't work inside a laravel controller method).

Thanks in advance.

0 likes
1 reply

Please or to participate in this conversation.