| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?php
- namespace App\Console\Commands;
- use App\Services\StudentRegistrationDraftService;
- use Illuminate\Console\Command;
- class ClearStudentRegistrationDrafts extends Command
- {
- /**
- * The name and signature of the console command.
- *
- * @var string
- */
- protected $signature = 'students:clear-registration-drafts';
- /**
- * The console command description.
- *
- * @var string
- */
- protected $description = 'Remove os rascunhos de estudantes e suas reservas de CPF e e-mail';
- /**
- * Execute the console command.
- */
- public function handle(StudentRegistrationDraftService $service): int
- {
- $clearedDrafts = $service->clearAll();
- $this->components->info(
- trans_choice(
- '{0} Nenhum rascunho de estudante foi encontrado.|{1} Um rascunho de estudante foi removido.|[2,*] :count rascunhos de estudantes foram removidos.',
- $clearedDrafts,
- ['count' => $clearedDrafts],
- ),
- );
- return self::SUCCESS;
- }
- }
|