Skip to content

Commit 015017c

Browse files
committed
Service container
1 parent 42f7ce0 commit 015017c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

releases.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ For more information on middleware, check out [the documentation](/docs/5.0/midd
3737

3838
### Controller Method Injection
3939

40-
In addition to the existing constructor injection, you may now type-hint dependencies on controller methods. The [IoC container](/docs/5.0/container) will automatically inject the dependencies, even if the route contains other parameters:
40+
In addition to the existing constructor injection, you may now type-hint dependencies on controller methods. The [service container](/docs/5.0/container) will automatically inject the dependencies, even if the route contains other parameters:
4141

4242
public function createPost(Request $request, PostRepository $posts)
4343
{
@@ -205,7 +205,7 @@ Once the class has been defined, we can type-hint it on our controller action:
205205
var_dump($request->input());
206206
}
207207

208-
When the Laravel IoC container identifies that the class it is injecting is a `FormRequest` instance, the request will **automatically be validated**. This means that if your controller action is called, you can safely assume the HTTP request input has been validated according to the rules you specified in your form request class. Even more, if the request is invalid, an HTTP redirect, which you may customize, will automatically be issued, and the error messages will be either flashed to the session or converted to JSON. **Form validation has never been more simple.** For more information on `FormRequest` validation, check out the [documentation](/docs/5.0/validation#form-request-validation).
208+
When the Laravel service container identifies that the class it is injecting is a `FormRequest` instance, the request will **automatically be validated**. This means that if your controller action is called, you can safely assume the HTTP request input has been validated according to the rules you specified in your form request class. Even more, if the request is invalid, an HTTP redirect, which you may customize, will automatically be issued, and the error messages will be either flashed to the session or converted to JSON. **Form validation has never been more simple.** For more information on `FormRequest` validation, check out the [documentation](/docs/5.0/validation#form-request-validation).
209209

210210
### Simple Controller Request Validation
211211

0 commit comments

Comments
 (0)