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

Related issues

robjbrain picture robjbrain  路  64Comments

JosephSilber picture JosephSilber  路  176Comments

astr0naugh7 picture astr0naugh7  路  65Comments

nkeena picture nkeena  路  75Comments

Xerotherm1c picture Xerotherm1c  路  70Comments