aboutsummaryrefslogtreecommitdiff
path: root/app/Http/Controllers/Auth/RegisterController.php
diff options
context:
space:
mode:
authorCamil Staps2019-12-30 16:57:13 +0100
committerCamil Staps2020-01-03 19:06:02 +0100
commitad10a6467f76822b9289832eeb0d0ac2038b32d1 (patch)
tree1d78251ad49be1a744dc4573a1b3cf54e295e3a4 /app/Http/Controllers/Auth/RegisterController.php
parentClarify 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.php76
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;
- }
-}