From 7da1325b1f84f36ce3aeb47d04633c9dd937af07 Mon Sep 17 00:00:00 2001 From: Brian Rogers Date: Tue, 4 Oct 2022 10:17:18 -0600 Subject: [PATCH] adding some to the docblocks for Laravel models --- Packages/User/Preferences.sublime-settings | 3 ++- Packages/User/laravel_model.sublime-snippet | 22 ++++++++++++++------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/Packages/User/Preferences.sublime-settings b/Packages/User/Preferences.sublime-settings index 142abe4..c0cf817 100644 --- a/Packages/User/Preferences.sublime-settings +++ b/Packages/User/Preferences.sublime-settings @@ -25,7 +25,6 @@ [ "dlig" ], - "font_size": 9, "git_diff_target": "head", "hardware_acceleration": "opengl", "highlight_modified_tabs": true, @@ -44,4 +43,6 @@ "show_line_endings": true, "theme": "Material-Theme.sublime-theme", "translate_tabs_to_spaces": true, + /*"font_size": 9,*/ + /*"font_size": 11,*/ } diff --git a/Packages/User/laravel_model.sublime-snippet b/Packages/User/laravel_model.sublime-snippet index 4aff8a6..c559cba 100644 --- a/Packages/User/laravel_model.sublime-snippet +++ b/Packages/User/laravel_model.sublime-snippet @@ -44,7 +44,7 @@ protected \$touches = []; /** @var array */ protected \$dispatchesEvents = []; -/* +/** |-------------------------------------------------------------------------- | Class Constants |-------------------------------------------------------------------------- @@ -53,7 +53,7 @@ protected \$dispatchesEvents = []; // -/* +/** |-------------------------------------------------------------------------- | Custom/Private Methods |-------------------------------------------------------------------------- @@ -63,18 +63,20 @@ protected \$dispatchesEvents = []; /** * Get the prunable model query. * + * @package App\Models\Class * @since 1.0.0 * * @return \Illuminate\Database\Eloquent\Builder */ public function prunable(): Builder { - //return static::where('created_at', '<=', now()->subMonth()); + return static::where('deleted_at', '<=', now()->subMonth()); } /** * Prepare the model for pruning. * + * @package App\Models\Class * @since 1.0.0 * * @return void @@ -87,6 +89,7 @@ protected function pruning(): void /** * Get the value used to index the model. * + * @package App\Models\Class * @since 1.0.0 * * @return mixed @@ -99,6 +102,7 @@ public function getScoutKey() /** * Get the key name used to index the model. * + * @package App\Models\Class * @since 1.0.0 * * @return string @@ -111,6 +115,7 @@ public function getScoutKeyName(): string /** * Get the name of the index associated with the model. * + * @package App\Models\Class * @since 1.0.0 * * @return string @@ -123,6 +128,7 @@ public function searchableAs(): string /** * Get the indexable data array for the model. * + * @package App\Models\Class * @since 1.0.0 * * @return array @@ -136,7 +142,7 @@ public function toSearchableArray(): array return \$payload; } -/* +/** |-------------------------------------------------------------------------- | Accessors |-------------------------------------------------------------------------- @@ -146,6 +152,7 @@ public function toSearchableArray(): array /** * An accessor. * + * @package App\Models\Class * @since 1.0.0 * * @return \Illuminate\Database\Eloquent\Casts\Attribute @@ -158,7 +165,7 @@ protected function attrName(): Attribute ); } -/* +/** |-------------------------------------------------------------------------- | Mutators |-------------------------------------------------------------------------- @@ -167,7 +174,7 @@ protected function attrName(): Attribute // -/* +/** |-------------------------------------------------------------------------- | Scopes |-------------------------------------------------------------------------- @@ -176,7 +183,7 @@ protected function attrName(): Attribute // -/* +/** |-------------------------------------------------------------------------- | Relationships |-------------------------------------------------------------------------- @@ -186,6 +193,7 @@ protected function attrName(): Attribute /** * Something relationship. * + * @package App\Models\Class * @since 1.0.0 * * @return \Illuminate\Database\Eloquent\Relations\BelongsTo