As usual, first of all try php artisan optimize:clear and recreate vendor folder (delete it and run composer install)
Weird error with a Laravel route
Situation: I have a Laravel app with a production version, a staging version, and the development version that I keep on my local hard drive. My dev computer uses XAMPP as its server. Up until a month or so ago, the dev version was in a folder directly under C:, not under xampp/htdocs. I had created a virtual host to redirect "app.test" to the app's root folder, and it all worked fine that way.
Then I reorganized my hard drive, and in the process I moved the dev version to a folder of its own under xampp/htdocs. At the time this didn't seem to make any difference, and it still ran fine. However, while experimenting with a new function today, I discovered that certain routes no longer work. To be exact, any route that gets referenced through an ajax GET call returns a 404 error, even though the route absolutely does exist in web.php, and the code in the web.php file hasn't changed. This problem is limited to my dev version; the routes still work correctly in the staging and production versions. This convinces me that it's a configuration error.
I've checked and confirmed that references to the old virtual host are commented out in the vhosts file. URL rewriting is definitely enabled. The URLs I'm trying to call show up in the routes list. I've shut down and restarted the Xampp server, and even completely rebooted the computer in case something was lingering in RAM. I've checked route definitions, cleared the route cache, checked the syntax of the URLs being called, checked httpd.conf and .htaccess, regenerated the autoload files... everything I can think of. Nothing has helped.
What else could be causing this?
Please or to participate in this conversation.