Unable to prepare route [login] for serialization. Uses Closure.

L5 error.


You can cannot cache routes that use Closure’s.

“If your application is exclusively using controller routes, you may take advantage of Laravel’s route cache.”.

You must have already cached your routes then added a new one with a Closure which would give you that error when you go to clear the route cache to generate a new one.

You can do the following though:



Sam Deering

Sam Deering is a web developer from England (currently living in Australia). In his spare time he enjoys coding, playing chess, reading and investing.

Leave a Reply

Your email address will not be published. Required fields are marked *