diff --git a/README.md b/README.md index f2d4eac..62f93d1 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/snippets/model.json b/snippets/model.json index 61a8e05..41cca9b 100644 --- a/snippets/model.json +++ b/snippets/model.json @@ -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." } -} \ No newline at end of file +}