Skip to content
This repository was archived by the owner on Dec 20, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ Quickly get your models up and running with Laravel Model Snippets. Start with `
| `Modal::tc` | Relationship Touches |
| `Model::i` | Incrementing |
| `Modal::pp` | Per Page Pagination |

| `Modal::cat` | Created At |
| `Modal::uat` | Updated At |

## Changelog

Expand Down
26 changes: 25 additions & 1 deletion snippets/model.json
Original file line number Diff line number Diff line change
Expand Up @@ -295,5 +295,29 @@
"protected \\$perPage = $0;"
],
"description": "PerPage: The number of models to return for pagination."
},
"Laravel Model: Created At": {
"prefix": "Model::cat",
"body": [
"/**",
" * The name of the \"created at\" column.",
" *",
" * @var string",
" */",
"const CREATED_AT = '${1:created_at}';$0"
],
"description": "Created At: The name of the \"created at\" column."
},
"Laravel Model: Updated At": {
"prefix": "Model::uat",
"body": [
"/**",
" * The name of the \"updated at\" column.",
" *",
" * @var string",
" */",
"const UPDATED_AT = '${1:updated_at}';$0"
],
"description": "Updated At: The name of the \"updated at\" column."
}
}
}