diff options
author | Camil Staps | 2019-12-30 16:57:13 +0100 |
---|---|---|
committer | Camil Staps | 2020-01-03 19:06:02 +0100 |
commit | ad10a6467f76822b9289832eeb0d0ac2038b32d1 (patch) | |
tree | 1d78251ad49be1a744dc4573a1b3cf54e295e3a4 /app/Http/Controllers/Auth/RegisterController.php | |
parent | Clarify incorrect parsing message when input is short (diff) |
Strip down for simple app for Greek verb λύω
Diffstat (limited to 'app/Http/Controllers/Auth/RegisterController.php')
-rw-r--r-- | app/Http/Controllers/Auth/RegisterController.php | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php deleted file mode 100644 index 29ec08a..0000000 --- a/app/Http/Controllers/Auth/RegisterController.php +++ /dev/null @@ -1,76 +0,0 @@ -<?php - -namespace App\Http\Controllers\Auth; - -use HebrewParseTrainer\User; -use Validator; -use App\Http\Controllers\Controller; -use Illuminate\Foundation\Auth\RegistersUsers; - -class RegisterController extends Controller -{ - /* - |-------------------------------------------------------------------------- - | Register Controller - |-------------------------------------------------------------------------- - | - | This controller handles the registration of new users as well as their - | validation and creation. By default this controller uses a trait to - | provide this functionality without requiring any additional code. - | - */ - - use RegistersUsers; - - /** - * Where to redirect users after login / registration. - * - * @var string - */ - protected $redirectTo = '/'; - - /** - * Create a new controller instance. - * - * @return void - */ - public function __construct() - { - $this->middleware('guest'); - } - - /** - * Get a validator for an incoming registration request. - * - * @param array $data - * @return \Illuminate\Contracts\Validation\Validator - */ - protected function validator(array $data) - { - return Validator::make($data, [ - 'name' => 'required|max:255', - 'email' => 'required|email|max:255|unique:users', - 'password' => 'required|min:6|confirmed', - ]); - } - - /** - * Create a new user instance after a valid registration. - * - * @param array $data - * @return User - */ - protected function create(array $data) - { - $user = new User([ - 'name' => $data['name'], - 'email' => $data['email'], - ]); - - $user->password = bcrypt($data['password']); - - $user->save(); - - return $user; - } -} |