ServerUpdate.php 461 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace App\Http\Requests\Admin;
  3. use Illuminate\Foundation\Http\FormRequest;
  4. class ServerUpdate extends FormRequest
  5. {
  6. /**
  7. * Get the validation rules that apply to the request.
  8. *
  9. * @return array
  10. */
  11. public function rules()
  12. {
  13. return [
  14. 'show' => 'in:0,1'
  15. ];
  16. }
  17. public function messages()
  18. {
  19. return [
  20. 'show.in' => '显示状态格式不正确'
  21. ];
  22. }
  23. }