Hello, I am doing a shopping-cart for the lessons of youtube-user Mindspace ( https://www.youtube.com/watch?v=ufIK3PzwYf4&index=6&list=PL55RiY5tL51qUXDyBqx0mKVOhLNFwwxvH ), for 12 minutes and 50 seconds, for a time, for 12 minutes and 50 seconds, for a long time, I’m not going to be in the mode, and for 12 min 50 seconds, it will be in the case, I’m not going to be in the case, I’m not going to be in the line, but for 12 min 50 seconds, for the rest of the time, I’m not going to be in the line, for 12 min 50 sec it gives:

404 (Not found)... The requested URL /signup was not found on this server. 

UserController.php:

 class UserController extends Controller { public function getSignup() { return view('user.signup'); } public function postSignup(Request $request) { $this->validate($request, [ 'email' => 'email|required|unique:users', 'password' => 'required|min:4' ]); $user = new User([ 'email' =>$request->input('email'), 'password' => bcrypt($request->input('password')) ]); $user->save(); return redirect()->route('property.index'); } 

}

web.php:

 Route::get('/', [ 'uses' => 'PropertyController@getIndex', 'as' => 'property.index' ]); Route::get('/signup', [ 'uses' => 'UserController@getSignup', 'as' => 'user.signup' ]); Route::post('/signup', [ 'uses' => 'UserController@postSignup', 'as' => 'user.signup' ]); 

enter image description here

Github Link:

 https://github.com/AlexBukreyev/auth 

Added link to github with this project

Apache logs:

 127.0.0.1 - - [27/Feb/2017:12:53:57 +0200] "GET /signup HTTP/1.1" 404 503 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0" 127.0.0.1 - - [27/Feb/2017:12:54:06 +0200] "POST /phpmyadmin/index.php HTTP/1.1" 200 2392 "http://localhost/phpmyadmin /index.php?target=server_databases.php&token=babaae057266e9780f747e4ff6486617" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0" 

file public /.htaccess:

 <IfModule mod_rewrite.c> <IfModule mod_negotiation.c> Options -MultiViews </IfModule> RewriteEngine On # Redirect Trailing Slashes If Not A Folder... RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)/$ /$1 [L,R=301] # Handle Front Controller... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L] # Handle Authorization Header RewriteCond %{HTTP:Authorization} . RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] </IfModule> 
  • one
    Maybe your server is still not looking there :) so everything seems to be ok - Orange_shadow
  • one
    Read the article, put valet , in the docks you will find how to use! - Orange_shadow
  • one
    start fpm and check php artisan serv - Orange_shadow
  • one
    I thought you had been plowing everything for a long time, look, maybe your apache doesn’t show the wrong folder! due on public - Orange_shadow
  • one
    Well, if fpm works for you, then the problem is with the apach settings - Orange_shadow

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