Error 404 when accessing my virtual host

1

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.

    
asked by Roman González 07.02.2018 в 21:26
source

1 answer

0

Change the permissions of the / public, / storage and / bootstrap directories to 777.

Running: sudo chmod 777 -R /public

    
answered by 14.02.2018 в 17:39