Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel artisan route:cache causes Erroneous data Exception

Tags:

php

laravel

Running the command: php artisan route:cache produces the following execption:

Erroneous data format for unserializing 'Symfony\Component\Routing\CompiledRoute'

Running: php artisan route:clear fixes it

I'd like to know how I can fix this so I can cache my routes.

like image 519
Nate Avatar asked Dec 23 '19 04:12

Nate


2 Answers

For me, this error was solved by deleting the following path files:

\bootstrap\cache
like image 189
n.y Avatar answered Nov 12 '22 16:11

n.y


This worked for me

php artisan optimize:clear
php artisan config:clear
php artisan config:cache
composer dump-autoload 
like image 11
Vishnu Damwala Avatar answered Nov 12 '22 15:11

Vishnu Damwala