Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2485250
PurgeCommand.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
704 B
Referenced Files
None
Subscribers
None
PurgeCommand.php
View Options
<?php
namespace
App\Console\Commands\AuthAttempt
;
use
App\Console\Command
;
use
App\AuthAttempt
;
use
Carbon\Carbon
;
class
PurgeCommand
extends
Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected
$signature
=
'authattempt:purge'
;
/**
* The console command description.
*
* @var string
*/
protected
$description
=
'Purge old AuthAttempts from the database'
;
/**
* Execute the console command.
*
* @return mixed
*/
public
function
handle
()
{
$cutoff
=
Carbon
::
now
()->
subDays
(
30
);
AuthAttempt
::
where
(
'updated_at'
,
'<'
,
$cutoff
)
->
delete
();
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Nov 21, 11:46 AM (1 d, 21 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
387457
Default Alt Text
PurgeCommand.php (704 B)
Attached To
Mode
R2 kolab
Attached
Detach File
Event Timeline
Log In to Comment