unserialize(): Error at offset 0 of 40 bytes Error

Solution 1:

You have to set a news Key Generate because

php artisan key:generate

After that test again to run the Laravel Application

php artisan serve

Solution 2:

I got the same error, when I upgrade a Laravel 5.5 app to 5.6. The error comes form the EncryptCookies-Middleware.

Delete the cookies in your browser and/or clear your session-files in your Laravel app.

Solution 3:

I've faced same problem. I frequently faced this problem in Homestead-vagrant environment. To solve this issue in Laravel 5.4,5.5,5.6 or more -

php artisan config:clear

php artisan view:clear

php artisan key:generate