Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

✨ WordPress ORM with Eloquent, an object-relational mapper that makes it enjoyable to interact with your database.

License

NotificationsYou must be signed in to change notification settings

dimitriBouteille/wp-orm

Repository files navigation

GitHub ReleaseTestsPackagist DownloadsEloquent versionCoverage Status

WordPress ORM with Eloquent is a small library that adds a basic ORM into WordPress, which is easily extendable and includes models for core WordPress models such as posts, post metas, users, comments and more.The ORM is based onEloquent ORM and uses the WordPress connection (wpdb class).

Tip

To simplify the integration of this library, we recommend using WordPress with one of the following tools:Bedrock,Themosis orWordplate.

Features

  • ✅ Support core WordPress models:Comment,Option,Post,TermTaxonomy,Term,User,PostMeta andUserMeta
  • ✅ Support core WordPress post type:Article,Attachment andPage
  • ✅ Based on core WordPress database connection (wpdb class), no configuration required !
  • ✅ Custom functions to filter models with meta
  • ✅ Meta casting (e.g.Attribute Casting)
  • ✅ Multisite support
  • ❤️ Easy integration of a custom post and comment type
  • ❤️ Easy model creation for projects with custom tables
  • ❤️ All the features available in Eloquent, are usable with this library !

Not yet developed but planned in a future version:

Documentation

This documentation only covers the specific points of this library, if you want to know more about Eloquent, the easiest is to look atthe documentation of Eloquent.

You can find all the documentation inthe wiki.

Installation

Requirements

The server requirements are basically the same as forWordPress with the addition of a few ones :

Installation

You can useComposer. Follow theinstallation instructions if you do not already have composer installed.

composer require dbout/wp-orm

In yourwp-config.php make sure you include the autoloader:

require__DIR__ .'/vendor/autoload.php';

🎉 You have nothing more to do, you can use the library now! Not even need to configure database accesses because it's thewpdb connection that is used.

Contributing

We encourage you to contribute to this repository, so everyone can benefit from new features, bug fixes, and any other improvements. Have a look at ourcontributing guidelines to find out how to raise a pull request.


[8]ページ先頭

©2009-2025 Movatter.jp