Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
namespace Illuminate\Auth\Console;
4
 
5
use Illuminate\Console\Command;
6
use Symfony\Component\Console\Attribute\AsCommand;
7
 
8
#[AsCommand(name: 'auth:clear-resets')]
9
class ClearResetsCommand extends Command
10
{
11
    /**
12
     * The name and signature of the console command.
13
     *
14
     * @var string
15
     */
16
    protected $signature = 'auth:clear-resets {name? : The name of the password broker}';
17
 
18
    /**
19
     * The name of the console command.
20
     *
21
     * This name is used to identify the command during lazy loading.
22
     *
23
     * @var string|null
24
     *
25
     * @deprecated
26
     */
27
    protected static $defaultName = 'auth:clear-resets';
28
 
29
    /**
30
     * The console command description.
31
     *
32
     * @var string
33
     */
34
    protected $description = 'Flush expired password reset tokens';
35
 
36
    /**
37
     * Execute the console command.
38
     *
39
     * @return void
40
     */
41
    public function handle()
42
    {
43
        $this->laravel['auth.password']->broker($this->argument('name'))->getRepository()->deleteExpired();
44
 
45
        $this->components->info('Expired reset tokens cleared successfully.');
46
    }
47
}