Support the ongoing development of Laravel.io →
Authentication

I am a newbie to Laravel or any php frame work and don't know how or where to make a class. I am following Laracasts Easy Auth tutorial and am stuck.

The following is my AuthController.php, but when I try register I get: ReflectionException in RouteDependencyResolverTrait.php line 53: Class App\Http\Controllers\Auth\Request does not exist.

I would greatly appreciate any help.

Regards Marea (Australia)

<?php namespace App\Http\Controllers\Auth; use App\Http\Controllers\Controller; use Illuminate\Contracts\Auth\Guard; use Illuminate\Contracts\Auth\Registrar; use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers; use App\Http\Controllers\Auth\Request; class AuthController extends Controller { /* |-------------------------------------------------------------------------- | Registration & Login Controller |-------------------------------------------------------------------------- | | This controller handles the registration of new users, as well as the | authentication of existing users. By default, this controller uses | a simple trait to add these behaviors. Why don't you explore it? | */ use AuthenticatesAndRegistersUsers; /** * Create a new authentication controller instance. * * @param \Illuminate\Contracts\Auth\Guard $auth * @param \Illuminate\Contracts\Auth\Registrar $registrar * @return void */ public function getRegister() { return view('auth.register'); } public function postRegister(Request $request) { $validator = $this->registrar->validator($request->all()); if ($validator->fails()) { $this->throwsValidationException( $request, $validator ); } $this->auth->login($this->registrar->create($request->all())); return redirect($this->redirectPath()); } public function getLogin() { return view('auth.login'); } public function postLogin(Request $request) { $this->validate($request, [ 'email' => 'required', 'password' => 'required', ]); $credentials = $request->only('email', 'password'); if ($this->attempt($credentials, $request->has('remember'))) { return redirect()->intended($this->redirectPath()); } return redirect('/auth/login') ->withInput($request->only('email')) ->withErrors([ 'email' => 'These credentials do not match our records.' ]); } public function __construct(Guard $auth, Registrar $registrar) { $this->auth = $auth; $this->registrar = $registrar; $this->middleware('guest', ['except' => 'getLogout']); } }
Last updated 2 years ago.
0

You replace it

use App\Http\Controllers\Auth\Request;

with

use Request;
0

Hi tuyenlaptrinh

I was a bit nervous about posting because Jimgwhit doesn't seem to like newbies posting (was he never a newbie?), but some times its the only way we can get over a hurdle.

So thank you so much for helping me

Regards Marea xxxxx

0

Ohhh :)

I think, with a coder, a developer. We will be to a researcher, googler ....:D

I am a user like you. I don't have any permission :)

But i think he's a young man

I'm vietnamese. So sorry for my poor english

Last updated 9 years ago.
0

Ah ha, caught a newbie posting, hey just kidding.

0

@jimgwhit: Sometime we have comfortable with newbies Laravel (I'm a newbie) to make strong communities

May be they don't have any keywords for search.

Like me. Because my english was poor. Sometime, i can't think any keywords for solutions :)

0

Sign in to participate in this thread!

Eventy

Your banner here too?

lollylegs lollylegs Joined 23 Feb 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.