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 = '/';
31 * Create a new authentication controller instance.
35 public function __construct()
37 $this->middleware('guest', ['except' => 'getLogout']);
41 * Get a validator for an incoming registration request.
44 * @return \Illuminate\Contracts\Validation\Validator
46 protected function validator(array $data)
48 return Validator::make($data, [
49 'name' => 'required|max:255',
50 'email' => 'required|email|max:255|unique:users',
51 'password' => 'required|confirmed|min:6',
56 * Create a new user instance after a valid registration.
61 protected function create(array $data)
64 'name' => $data['name'],
65 'email' => $data['email'],
66 'password' => bcrypt($data['password']),