Simplify validation on register stuff.

This commit is contained in:
Taylor Otwell
2014-11-24 14:25:44 -06:00
parent 4803d6c8e2
commit 7a7e366da5
3 changed files with 15 additions and 66 deletions

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|max:255|email|unique:users',
'password' => 'required|confirmed|min:8',
];
}
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
}