104 lines
2.0 KiB
XML
104 lines
2.0 KiB
XML
<snippet>
|
|
<content><![CDATA[
|
|
use Prunable;
|
|
|
|
protected \$table = '';
|
|
|
|
protected \$keyType = 'string';
|
|
|
|
public \$incrementing = false;
|
|
|
|
protected \$fillable = [];
|
|
|
|
protected \$hidden = [];
|
|
|
|
protected \$attributes = [];
|
|
|
|
protected \$casts = [];
|
|
|
|
protected \$dates = [];
|
|
|
|
protected \$appends = [];
|
|
|
|
protected \$touches = [];
|
|
|
|
protected \$dispatchesEvents = [];
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Class Constants
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
//
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Custom/Private Methods
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
/**
|
|
* Get the prunable model query.
|
|
*
|
|
* @return \Illuminate\Database\Eloquent\Builder
|
|
*/
|
|
public function prunable(): Builder
|
|
{
|
|
return static::where('created_at', '<=', now()->subMonth());
|
|
}
|
|
|
|
/**
|
|
* Prepare the model for pruning.
|
|
*
|
|
* @return void
|
|
*/
|
|
protected function pruning(): void
|
|
{
|
|
//
|
|
}
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Accessors
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
//
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Mutators
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
//
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Scopes
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
//
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Relationships
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
//
|
|
]]></content>
|
|
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
|
|
<tabTrigger>laramodel</tabTrigger>
|
|
<!-- Optional: Set a scope to limit where the snippet will trigger -->
|
|
<!-- <scope>source.python</scope> -->
|
|
</snippet>
|