/
githubmirror
/
framework
Обзор
Документация
Войти
/
githubmirror
/
framework
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
13.x
src/Illuminate/Queue/Console/BatchesTableCommand.php
71 строка
2 KB
Denys Finchenko
Sync property docblocks with their parent declarations (#60991)
03 авг 2026, 01:17
Не верифицирован
03 авг 2026, 01:17
251dc09
Код
Авторство
О чём код?
<?php namespace Illuminate\Queue\Console; use Illuminate\Console\MigrationGeneratorCommand; use Symfony\Component\Console\Attribute\AsCommand; use function Illuminate\Filesystem\join_paths; #[AsCommand(name: 'make:queue-batches-table', aliases: ['queue:batches-table'])] class BatchesTableCommand extends MigrationGeneratorCommand { /** * The name and signature of the console command. * * @var string */ protected $signature = 'make:queue-batches-table'; /** * The console command name aliases. * * @var string[] */ protected $aliases = ['queue:batches-table']; /** * The console command description. * * @var string */ protected $description = 'Create a migration for the batches database table'; /** * Get the migration table name. * * @return string */ protected function migrationTableName() { return $this->laravel['config']['queue.batching.table'] ?? 'job_batches'; } /** * Get the path to the migration stub file. * * @return string */ protected function migrationStubFile() { return __DIR__.'/stubs/batches.stub'; } /** * Determine whether a migration for the table already exists. * * @param string $table * @return bool */ protected function migrationExists($table) { if ($table !== 'job_batches') { return parent::migrationExists($table); } return array_any([ join_paths($this->laravel->databasePath('migrations'), '*_*_*_*_create_'.$table.'_table.php'), join_paths($this->laravel->databasePath('migrations'), '0001_01_01_000002_create_jobs_table.php'), ], fn ($path) => count($this->files->glob($path)) !== 0); } }