# 绑定类到容器

绑定类到Laravel的容器实际上就是告诉容器，”如果开发人员要访问一个Logger实例，这的代码用于实例化一个带有正确参数跟依赖的实例，然后正确的返回它“。

我们正在告诉容器，当有人请求这个特殊的字符串(完全限定类名FQCN)，它应该用这种方式来解决。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://liseen315.gitbook.io/laravel/rong-qi/bang-ding-lei-dao-rong-qi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
