Heim  >  Artikel  >  Backend-Entwicklung  >  什么是Laravel Eloquent ORM?

什么是Laravel Eloquent ORM?

WBOY
WBOYOriginal
2016-06-06 20:16:071118Durchsuche

不明白这个东西是什么??
Eloquent与传统MVC模型中的M(模型)的关系是什么??
可不可以说Eloquent是一种已经将数据注入到模型的模型吗?
提问者初学laravel,许多方面还是不懂。。

回复内容:

不明白这个东西是什么??
Eloquent与传统MVC模型中的M(模型)的关系是什么??
可不可以说Eloquent是一种已经将数据注入到模型的模型吗?
提问者初学laravel,许多方面还是不懂。。

Eloquent 是 Laravel 中实现的一个 ORM 框架,原话为:

The Eloquent ORM included with Laravel provides a beautiful, simple
ActiveRecord implementation for working with your database.

所以 Eloquent 是作为 Laravel ORM 框架的一个名称,其命名空间下包括 Model、Relationship、Builder 等类的实现,这些类提供数据到对象的映射,同时提供模型间关系(Relationship)的支持。

比如 M$ 的 Entity Framework,同样是一个 ORM 框架,其中包含模型和关系查询、操作等。

更多关于 Eloquent 的可以参考 API:https://laravel.com/api/5.2/Illuminate/Database/Eloquent.html

并非非常专业的回答。

以上。

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn