Apparently you work with an apache server (xampp or wamp), since that problem occurs in both sets confuse laravel routes.
I recommend some things like:
1 .- Work with homestead
2 .- Create a virtual host
3.- It is not recommendable but it works correctly and it is a quick solution, what you would have to do is edit the index.php
of xampp that should be in the following path: C : \ xampp \ htdocs \ index.php
index.php: You must have the following content
<?php
if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
$uri = 'https://';
} else {
$uri = 'http://';
}
$uri .= $_SERVER['HTTP_HOST'];
header('Location: '.$uri.'/dashboard/');
exit;
?>
You change it by:
<?php
if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
$uri = 'https://';
} else {
$uri = 'http://';
}
$uri .= $_SERVER['HTTP_HOST'];
header('Location: '.$uri.'/miproyecto/public');
//header('Location: '.$uri.'/dashboard/'); //solo lo comentas para que no se te olvide
exit;
//?>
As you can see, only one line code was changed, and after that, you just rebooted Apache and your project would be in localhost and all the routes will work. Of course, what happens is that the xammp dashboard does not work but it is solved leaving the code as the original reason why you only comment that line.