my routes protected by auth middleware don't redirect to login page

I get this error every time I visit a route protected by auth middleware when am not authenticated and started session


Illuminate\Session\Middleware\StartSession::addCookieToResponse(): Argument #1 ($response) must be of type Symfony\Component\HttpFoundation\Response, null given, called in /home/u684103588/domains/chccug.com/public_html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php on line 125

I have alternated the middlewares in the app to no avail
Solution
Deleted all the default files and installed fresh installation of Laravel 10, added all the custom codes run composer install and every started working perfectly fine
Was this page helpful?