Models
INFO
This page will describe how models can be generated.
Examples
Model
yaml
arch: 1.0.0
definitions:
models:
User:
columns:
name: string
mail: string
Model With Relationships
yaml
arch: 1.0.0
definitions:
models:
User:
columns:
name: string
mail: string
relationships:
hasMany: Comment
hasManyThrough: Deployment Environment
hasOneThrough: Owner Car
belongsToMany: Comment
hasOne: Comment
belongsTo: Comment
morphOne: Image imageable
morphTo: Comment
morphMany: Comment commentable
morphToMany: Tag taggable
morphedByMany: Post taggable
Model With Global Scopes
yaml
arch: 1.0.0
definitions:
models:
User:
columns:
name: string
mail: string
globalScopes:
- Ancient
Model With Local Scopes
yaml
arch: 1.0.0
definitions:
models:
User:
columns:
name: string
mail: string
localScopes:
- popular