# 数据库和Eloquent

Laravel提供了一套与应用程序数据库交互的工具，称为Eloquent，它是Laravel的 ActiveRecord ORM(对象关系映射)

Eloquent是Laravel的一大特点,这也是Laravel与大多数PHP框架不同的特性之一,在数据映射ORM直接中,Eloquent语言以其简单的特性脱颖而出,每一个个表对应一个类，负责检索，表示和维护该表中的数据

但是，无论您是否选择使用Eloquent，您仍然可以从Laravel提供的其他数据库工具中受益匪浅。 因此，在深入了解Eloquent之前，我们将首先介绍Laravel数据库功能的基础知识：迁移，播种和查询构建器

然后我们将会介绍Eloquent,它用于定义模型,插入和更新数据,使用访问,存取,属性转换来自定义你的响应,最后会讨论表关系,这里涵盖了诸多的内容,我相信通过逐步的学习我们能学会的.


---

# 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/shu-ju-ku-he-eloquent.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.
