Skip to content
Advertisement

Laravel 8.53 – Routing doesnt work on any of pages

Solution

The solution was found thanks to @Gert B.

Simply add to your Laravel application any virtual host (I added for mine) laravel1.test

How to add Virtual host: Go to C:WindowsSystem32driversetchosts

add line:

127.0.0.1 laravel1.test (or your virtual host name)

And add this to your vhosts(in case of using xampp) in C:xamppapacheconfextra httpd-vhosts

JavaScript

I can’t pass the problem with routing in Laravel 8.5 framework. I know there have been many requests about this problem so far but any of given solutions didnt help in my case. I will show Frontend code, since backend is the same thing and also doesnt work. Right now, the only thing that works is index.php.

I know thanks to newest Laravel all bugs are hidden under simple error 404.

Bug image

I already tried:

  • Changing in apache/conf/httpd solution AllowOverride All
  • Clearing whole cache and routes cache
  • Any possible misspells in code

Still, without any working anwser.

My FrontendController at app/Http/Controllers

JavaScript

My web.php at app/routes

JavaScript

.htacces file in app/public

JavaScript

My routes image

Advertisement

Answer

Solution

The solution was found thanks to @Gert B.

Simply add to your Laravel application any virtual host (I added for mine) laravel1.test

How to add Virtual host: Go to C:WindowsSystem32driversetchosts

add line:

127.0.0.1 laravel1.test (or your virtual host name)

And add this to your vhosts(in case of using xampp) in C:xamppapacheconfextra httpd-vhosts

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement