Framework: [5.1] Request object is not serializing

Created on 27 Dec 2015  路  3Comments  路  Source: laravel/framework

I have a queued Job which accepts Request object. But I get error stating:

Serialization of 'Closure' is not allowed

Tried Debugging, found out that Request object is not getting serialized.
Plus, It is an object, why is it getting as Closure.?

Most helpful comment

I got it from doing $request->all()

All 3 comments

The request object cannot be serialized. This is because it contains properties which contain objects containing closures.

You can get all the data out the request by writing (string) $request though.

I got it from doing $request->all()

Was this page helpful?
0 / 5 - 0 ratings