routes:

Route::get('/', [ 'uses' => 'ProductController@getIndex', 'as' => 'product.index' ]); Route::get('/signup', [ 'uses' => 'UserController@getSignup', 'as' => 'user.signup' ]); 

It is worth laravel 5.2 in the routes file the first route works, and the second is not. The address does not work in the route after the "/". PS: UserController substituted in the first route works !! Only the address after "/" does not want.

Help me please!

UserController, if you register ONLY with "/" (NOT '/ signup'), it works:

 Route::get('/signup', [ 'uses' => 'UserController@getSignup', 'as' => 'user.signup' ]); 
  • one
    Server as configured? Requests all zarulivayutsya on index.php? - ilyaplot
  • Apache 2.4 server looks in the public folder, all rights are open. DOES NOT "/" - Alexander
  • Check the list of routes, everything is ok, nothing intersects: php artisan route:list - xEdelweiss
  • nothing intersects .... (there are only these routes - Alexander

1 answer 1

It turned out it was in the settings of Apache! You need to enable rewrite through the console:

  apache2ctl -M | grep -i rew sudo a2enmod rewrite sudo /etc/init.d/apache2 restart