Hello, I am doing a shopping-cart on the lessons of this youtube-user , the video uses laravel 5.2, and I sat down to learn 5.3. Authorization problem.

web.php

Route::get('/signup', [ 'uses' => 'UserController@getSignup', 'as' => 'user.signup' ])->middleware('quest'); Route::post('/signup', [ 'uses' => 'UserController@postSignup', 'as' => 'user.signup' ])->middleware('quest');; Route::get('/signin', [ 'uses' => 'UserController@getSignin', 'as' => 'user.signin' ])->middleware('quest'); Route::post('/signin', [ 'uses' => 'UserController@postSignin', 'as' => 'user.signin' ])->middleware('quest'); 

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('product.index'); } public function getSignin() { return view('user.signin'); } public function postSignin(Request $request) { $this->validate($request, [ 'email' => 'email|required', 'password' => 'required|min:4' ]); if(Auth::attempt(['email'=> $request->input('email'), 'password' => $request->input('password')])){ return redirect()->route('user.profile'); } return redirect()->back(); } 

Kernel.php

  protected $routeMiddleware = [ 'auth' => \Illuminate\Auth\Middleware\Authenticate::class, 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, 'can' => \Illuminate\Auth\Middleware\Authorize::class, 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, ]; 

but when I try to go through 1 from URl (for example, laravel.dev/signin), I get this expetion enter image description here

    1 answer 1

    Change everywhere in the quest code to guest , learn to read errors for the future. The error states that an unknown class is quest . If you have not used such a class anywhere, then either your typo (check it in the code), or some class from the libraries you use, for example, did not load, then google the error.

    • one
      Say shame, do not say anything. Thank you very much. - newakkoff
    • Newakkoff started writing a project on this video course too, I also have 5.3, but something happened a lot earlier, what have you ... maybe you also encountered this? Lesson # 5 User Sign Up 12:50 I am doing a php command artisan migrate-everything is fine ... I go to adress_site.com/signup and it gives 404 (Not found) ... The requested URL / signup was not found on this server. Tell me please! I give you + voice only help ((( (( - Alexander