RegisterRequest.php 449 B

12345678910111213141516171819202122232425262728
  1. <?php namespace App\Http\Requests;
  2. class RegisterRequest extends Request {
  3. /**
  4. * Get the validation rules that apply to the request.
  5. *
  6. * @return array
  7. */
  8. public function rules()
  9. {
  10. return [
  11. 'email' => 'required|email|unique:users',
  12. 'password' => 'required|confirmed|min:8',
  13. ];
  14. }
  15. /**
  16. * Determine if the user is authorized to make this request.
  17. *
  18. * @return bool
  19. */
  20. public function authorize()
  21. {
  22. return true;
  23. }
  24. }