File manager - Edit - /var/www/html/portalHomolog/app/Console/Commands/CredenciamentoExpirarCommand.php
Back
<?php namespace App\Console\Commands; use Illuminate\Console\Command; use App\Models\Cultura\Credenciamento\Musico; class CredenciamentoExpirarCommand extends Command { protected $signature = 'credenciamento:expirar'; protected $description = 'Marca credenciamentos com data_expiracao vencida como status Expirado'; public function handle(): int { $count = Musico::whereNotNull('data_expiracao') ->where('data_expiracao', '<', now()->toDateString()) ->where('statusCadastro', '!=', 'Expirado') ->update(['statusCadastro' => 'Expirado']); $this->info("Credenciamentos marcados como Expirado: {$count}"); return self::SUCCESS; } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings