/
adssoft
/
ads_goskey_api
Обзор
Документация
Войти
/
adssoft
/
ads_goskey_api
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
app/Console/Commands/Development/FlushTables.php
43 строки
1 KB
Viatcheslav Malakhov
update
23 мар 2026, 17:28
23 мар 2026, 17:28
09e4e2a
Код
Авторство
О чём код?
<?php namespace App\Console\Commands\Development; use Illuminate\Console\Command; use DB; class FlushTables extends Command { /** * The name and signature of the console command. * * @var string */ protected $signature = 'development:flush'; /** * The console command description. * * @var string */ protected $description = 'Удаляет все записи из таблица errors, goskey_documents, incoming_documents, requests'; /** * Execute the console command. * * @return int */ public function handle() { $confirmed = $this->confirm('Вы точно хотите удалить все данные? Это действие нельзя будет отменить.'); if ($confirmed) { DB::statement('TRUNCATE errors'); DB::statement('TRUNCATE goskey_documents'); DB::statement('TRUNCATE incoming_documents'); DB::statement('TRUNCATE requests'); } return Command::SUCCESS; } }