Good afternoon I am learning to use Laravel and for that I am doing a project, the problem is that when I try to access my virtual host it shows me a 404 error.
I have the following routes in the routes / web.php file:
Route::redirect('/', 'icj'); Route::get('icj', 'Web\PageController@icj')->name('icj');
and in the controller I have only this code:
public function icj() { return 'Bienvenidos'; }
Before adding these new routes everything worked fine, the route that I was taking was:
Route::get('/', function () { return view('welcome'); });
The problem is that now even putting that route does not work for me.
Note 1: the virtual host points to my "public" directory of the project in Laravel where the "index.php" file is located, the strange thing is that if I change the url to " link index.php " if it works.