3 namespace Oxbow\Http\Controllers\Auth;
7 use Oxbow\Http\Controllers\Controller;
8 use Illuminate\Foundation\Auth\ThrottlesLogins;
9 use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers;
11 class AuthController extends Controller
14 |--------------------------------------------------------------------------
15 | Registration & Login Controller
16 |--------------------------------------------------------------------------
18 | This controller handles the registration of new users, as well as the
19 | authentication of existing users. By default, this controller uses
20 | a simple trait to add these behaviors. Why don't you explore it?
24 use AuthenticatesAndRegistersUsers, ThrottlesLogins;
26 protected $loginPath = '/login';
27 protected $redirectPath = '/';
28 protected $redirectAfterLogout = '/login';
32 * Create a new authentication controller instance.
36 public function __construct()
38 $this->middleware('guest', ['except' => 'getLogout']);
42 * Get a validator for an incoming registration request.
45 * @return \Illuminate\Contracts\Validation\Validator
47 protected function validator(array $data)
49 return Validator::make($data, [
50 'name' => 'required|max:255',
51 'email' => 'required|email|max:255|unique:users',
52 'password' => 'required|confirmed|min:6',
57 * Create a new user instance after a valid registration.
62 protected function create(array $data)
65 'name' => $data['name'],
66 'email' => $data['email'],
67 'password' => bcrypt($data['password']),