Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F10750814
AuthController.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
AuthController.php
View Options
<?php
namespace
Nasqueron\Notifications\Http\Controllers\Auth
;
use
Nasqueron\Notifications\User
;
use
Validator
;
use
Nasqueron\Notifications\Http\Controllers\Controller
;
use
Illuminate\Foundation\Auth\ThrottlesLogins
;
use
Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers
;
class
AuthController
extends
Controller
{
/*
|--------------------------------------------------------------------------
| Registration & Login Controller
|--------------------------------------------------------------------------
|
| This controller handles the registration of new users, as well as the
| authentication of existing users. By default, this controller uses
| a simple trait to add these behaviors. Why don't you explore it?
|
*/
use
AuthenticatesAndRegistersUsers
,
ThrottlesLogins
;
/**
* Create a new authentication controller instance.
*
* @return void
*/
public
function
__construct
()
{
$this
->
middleware
(
'guest'
,
[
'except'
=>
'getLogout'
]);
}
/**
* 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|confirmed|min:6'
,
]);
}
/**
* Create a new user instance after a valid registration.
*
* @param array $data
* @return User
*/
protected
function
create
(
array
$data
)
{
return
User
::
create
([
'name'
=>
$data
[
'name'
],
'email'
=>
$data
[
'email'
],
'password'
=>
bcrypt
(
$data
[
'password'
]),
]);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Jul 27, 20:36 (1 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2819532
Default Alt Text
AuthController.php (1 KB)
Attached To
Mode
rNOTIF Notifications center
Attached
Detach File
Event Timeline
Log In to Comment