Skip to content

Commit

Permalink
#7 WIP documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitriBouteille committed Jan 22, 2024
1 parent 1c0a220 commit affdd85
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ The ORM is based on [Eloquent ORM](https://laravel.com/docs/8.x/eloquent) and us

The ORM also offers a system to simply manage database migrations based on [Phinx](https://phinx.org/).

💡 To simplify the integration of this library, we recommend using WordPress with one of the following tools: [Bedrock](https://roots.io/bedrock/), [Themosis](https://framework.themosis.com/) or [Wordplate](https://github.com/wordplate/wordplate#readme).
> 📘 This is documentation for additional functionality on top of Eloquent. For documentation on all of Eloquent's features you visit the documentation.
> 💡 To simplify the integration of this library, we recommend using WordPress with one of the following tools: [Bedrock](https://roots.io/bedrock/), [Themosis](https://framework.themosis.com/) or [Wordplate](https://github.com/wordplate/wordplate#readme).
### Features

Expand All @@ -26,10 +28,9 @@ The ORM also offers a system to simply manage database migrations based on [Phin
### Documentation

- [Installation](#installation)
- [Introduction](#introduction)
- [Use WordPress models](doc/documentation.md#use-wordpress-models)
- [Use WordPress core models](doc/wordpress-core-models.md)
- [Create custom model](doc/create-model.md)
- [Filter data](/doc/documentation.md#filter-data)
- [Create custom Model](doc/create-model.md)
- [Migration with Phinx](doc/migration.md)

## Installation
Expand Down
2 changes: 1 addition & 1 deletion doc/create-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class MyModel extends AbstractModel

Once a model is defined, you are ready to start retrieving and creating records in your table. Note that you will need to place `updated_at` and `created_at` columns on your table by default. If you do not wish to have these columns automatically maintained, set the `$timestamps` property on your model to false.

> 💡 If your model may have metas, you can easily link metas to your model. You can look `Dbout\WpOrm\Models\Post` to understand how it works.
> 💡 If your model have metas, you can easily link metas to your model and use custom functions (e.g. `getMeta`, `getMetaValue`, ...). You can look `Dbout\WpOrm\Models\Post` to understand how it works.
> 📘 If you want to know more about creating a model you can look the [Eloquent documentation](https://laravel.com/docs/5.0/eloquent#basic-usage).
Expand Down
19 changes: 19 additions & 0 deletions doc/wordpress-core-models.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# WordPress Core Models

## Models

- Comment
- Option
- Post
- PostMeta
- Term
- TermRelationship
- TermTaxonomy
- User
- UserMeta

## Custom post type

- Attachment
- Article
- Page

0 comments on commit affdd85

Please sign in to comment.