single-table-inheritance:EloquentLaravel的单表继承特性

时间:2021-04-29 10:01:53
【文件属性】:
文件名称:single-table-inheritance:EloquentLaravel的单表继承特性
文件大小:27KB
文件格式:ZIP
更新时间:2021-04-29 10:01:53
PHP 单表继承 单表继承是Laravel 5.8+口才模型的特征,它允许将多个模型存储在同一数据库表中。 我们支持一些关键功能 实现为Trait,以便与其他语言(例如Laravel的SoftDeletingTrait或出色的,不需要复杂的SoftDeletingTrait Model子类。 允许任意的类层次结构,而不仅仅是两级父子关系。 可定制的数据库列名称,用于存储模型类型。 数据库中存储的模型类型值的可定制字符串。 (与强制使用完全限定的模型类名称相对。) 允许未映射到已知模型类型的数据库行。 它们将永远不会在查询中返回。 安装 只需将软件包添加到您的composer.json文件并运行composer update 。 "nanigans/single-table-inheritance": "~1.0" 或转到composer.json文件所在的项目目录,然后键入: com
【文件预览】:
single-table-inheritance-main
----composer.json(1006B)
----phpunit.xml(541B)
----.github()
--------workflows()
----tests()
--------SingleTableInheritanceTraitStaticMethodsTest.php(3KB)
--------Fixtures()
--------SingleTableInheritanceTraitModelMethodsTest.php(8KB)
--------SingleTableInheritanceTraitPersistenceTest.php(4KB)
--------migrations()
--------SingleTableInheritanceTraitManyToManyTest.php(2KB)
--------TestCase.php(2KB)
--------SingleTableInheritanceTraitQueryTest.php(8KB)
----src()
--------SingleTableInheritanceScope.php(2KB)
--------SingleTableInheritanceObserver.php(206B)
--------Exceptions()
--------SingleTableInheritanceTrait.php(9KB)
----.gitignore(87B)
----README.md(8KB)
----LICENSE.txt(1KB)

网友评论