adding some to the docblocks for Laravel models
This commit is contained in:
parent
6c15670077
commit
7da1325b1f
@ -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,*/
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ protected \$touches = [];
|
||||
/** @var array<int,string> */
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user