21 lines
426 B
PHP
21 lines
426 B
PHP
<?php
|
|
|
|
namespace App\Models\Common;
|
|
|
|
use Illuminate\Database\Eloquent\Builder;
|
|
use Illuminate\Database\Eloquent\MassPrunable;
|
|
use Illuminate\Notifications\DatabaseNotification;
|
|
|
|
class Notification extends DatabaseNotification
|
|
{
|
|
use MassPrunable;
|
|
|
|
/**
|
|
* Get the prunable model query.
|
|
*/
|
|
public function prunable(): Builder
|
|
{
|
|
return static::where('created_at', '<=', now()->subWeek());
|
|
}
|
|
}
|