Working on removing authentication boilerplate.

This commit is contained in:
Taylor Otwell
2014-11-29 13:55:38 -06:00
parent e0afdf4c51
commit 9083f48e97
10 changed files with 89 additions and 334 deletions

View File

@@ -1,29 +0,0 @@
<?php namespace App\Http\Requests\Auth;
use App\Http\Requests\Request;
class EmailPasswordLinkRequest extends Request {
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'email' => 'required',
];
}
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
}

View File

@@ -1,29 +0,0 @@
<?php namespace App\Http\Requests\Auth;
use App\Http\Requests\Request;
class LoginRequest extends Request {
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'email' => 'required', 'password' => 'required',
];
}
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
}

View File

@@ -1,31 +0,0 @@
<?php namespace App\Http\Requests\Auth;
use App\Http\Requests\Request;
class RegisterRequest extends Request {
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'name' => 'required|max:255',
'email' => 'required|email|max:255|unique:users',
'password' => 'required|min:6|confirmed',
];
}
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
}

View File

@@ -1,31 +0,0 @@
<?php namespace App\Http\Requests\Auth;
use App\Http\Requests\Request;
class ResetPasswordRequest extends Request {
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'token' => 'required',
'email' => 'required',
'password' => 'required|confirmed',
];
}
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
}