mirror of
https://github.com/silverqx/TinyORM.git
synced 2025-12-21 10:29:36 -06:00
docs moved tip to other page
[skip ci]
This commit is contained in:
@@ -36,6 +36,10 @@ TinyORM is an object-relational mapper (ORM) that makes it enjoyable to interact
|
||||
Before getting started, be sure to configure a database connection in your application. For more information on configuring your database, check out the [database configuration documentation](database/getting-started.mdx#configuration).
|
||||
:::
|
||||
|
||||
:::tip
|
||||
If you want to see a model in which are used all possible TinyORM features you can look at the [`torrent.hpp`](https://github.com/silverqx/TinyORM/blob/main/tests/models/models/torrent.hpp) in the TinyORM's tests, this `Models::Torrent` class serves also as a showcase, so all possible features are defined in it.
|
||||
:::
|
||||
|
||||
## Generating Model Classes
|
||||
|
||||
To get started, let's create the simplest TinyORM model. Models typically live in the `database\models` directory and extend the `Orm::Tiny::Model` class. You may use the `make:model` command to generate a new model:
|
||||
|
||||
@@ -46,10 +46,6 @@ TinyORM relationships are defined as methods on your TinyORM model classes. Sinc
|
||||
|
||||
But, before diving too deep into using relationships, let's learn how to define each type of relationship supported by TinyORM.
|
||||
|
||||
:::tip
|
||||
If you want to see a model in which are used all possible TinyORM features you can look at the [`torrent.hpp`](https://github.com/silverqx/TinyORM/blob/main/tests/models/models/torrent.hpp) in the TinyORM's tests, this `Models::Torrent` class serves also as a showcase, so all possible features are defined in it.
|
||||
:::
|
||||
|
||||
### Common Rules
|
||||
|
||||
Before you start defining relationship methods, you have to declare a model class, let's examine following model class with a "one" type relation:
|
||||
|
||||
Reference in New Issue
Block a user