1 | <?php |
||
11 | class AuthController extends BaseController |
||
12 | { |
||
13 | /* |
||
14 | |-------------------------------------------------------------------------- |
||
15 | | Registration & Login Controller |
||
16 | |-------------------------------------------------------------------------- |
||
17 | | |
||
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? |
||
21 | | |
||
22 | */ |
||
23 | |||
24 | use AuthenticatesAndRegistersUsers, ThrottlesLogins; |
||
25 | |||
26 | /** |
||
27 | * Where to redirect users after login / registration. |
||
28 | * |
||
29 | * @var string |
||
30 | */ |
||
31 | protected $redirectTo; |
||
32 | |||
33 | /** |
||
34 | * Create a new authentication controller instance. |
||
35 | * |
||
36 | * @return void |
||
|
|||
37 | */ |
||
38 | public function __construct() |
||
47 | |||
48 | /** |
||
49 | * Get a validator for an incoming registration request. |
||
50 | * |
||
51 | * @param array $data |
||
52 | * @return \Illuminate\Contracts\Validation\Validator |
||
53 | */ |
||
54 | protected function validator(array $data) |
||
62 | |||
63 | protected function validate(\Illuminate\Http\Request $request, array $data) |
||
75 | |||
76 | /** |
||
77 | * Create a new user instance after a valid registration. |
||
78 | * |
||
79 | * @param array $data |
||
80 | * @return User |
||
81 | */ |
||
82 | protected function create(array $data) |
||
90 | |||
91 | public function showLoginForm() |
||
95 | |||
96 | // Todo |
||
97 | public function showRegistrationForm() |
||
101 | } |
||
102 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.