PasswordRequest.php 602 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace App\Http\Requests;
  3. use Auth;
  4. use Request;
  5. use Illuminate\Foundation\Http\FormRequest;
  6. class PasswordRequest extends FormRequest
  7. {
  8. protected $table = TABLE_ADMINS;
  9. /**
  10. * Determine if the user is authorized to make this request.
  11. *
  12. * @return bool
  13. */
  14. public function authorize()
  15. {
  16. return true;
  17. }
  18. /**
  19. * Get the validation rules that apply to the request.
  20. *
  21. * @return array
  22. */
  23. public function rules()
  24. {
  25. return [
  26. 'password' => 'required|string|min:6|max:16|confirmed',
  27. ];
  28. }
  29. }