File tree Expand file tree Collapse file tree 1 file changed +5
-15
lines changed
Expand file tree Collapse file tree 1 file changed +5
-15
lines changed Original file line number Diff line number Diff line change 99
1010```
1111composer require hyperf/validation
12-
1312```
1413
1514## Config
@@ -18,19 +17,17 @@ composer require hyperf/validation
1817### publish config
1918```
2019php bin/hyperf.php vendor:publish hyperf/validation
21-
2220```
2321
2422### config path
2523
2624```
2725your/config/path/autoload/translation.php
28-
2926```
3027
3128### config content
3229
33- ```
30+ ``` php
3431<?php
3532
3633declare(strict_types=1);
@@ -49,12 +46,11 @@ return [
4946 'fallback_locale' => '',
5047 'lang' => BASE_PATH . '/resources/lang',
5148];
52-
5349```
5450
5551### exception handler
5652
57- ```
53+ ``` php
5854<?php
5955
6056declare(strict_types=1);
@@ -75,12 +71,11 @@ return [
7571 ],
7672 ],
7773];
78-
7974```
8075
8176### validation middleware
8277
83- ```
78+ ``` php
8479<?php
8580
8681declare(strict_types=1);
@@ -99,7 +94,6 @@ return [
9994 \Hyperf\Validation\Middleware\ValidationMiddleware::class,
10095 ],
10196];
102-
10397```
10498
10599
@@ -113,11 +107,9 @@ php bin/hyperf.php gen:request FooRequest
113107```
114108
115109
116- ```
110+ ``` php
117111class IndexController extends Controller
118112{
119-
120-
121113 public function foo(FooRequest $request)
122114 {
123115 $request->input('foo');
@@ -149,6 +141,4 @@ class IndexController extends Controller
149141 }
150142 }
151143}
152-
153-
154- ```
144+ ```
You can’t perform that action at this time.
0 commit comments