/
githubmirror
/
framework
Обзор
Документация
Войти
/
githubmirror
/
framework
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
13.x
src/Illuminate/Database/Console/DatabaseInspectionCommand.php
50 строк
1 KB
Hafez Divandari
[12.x] Enhance multi-database support (#54274)
23 янв 2025, 02:07
Не верифицирован
23 янв 2025, 02:07
86c3dff
Код
Авторство
О чём код?
<?php namespace Illuminate\Database\Console; use Illuminate\Console\Command; use Illuminate\Database\ConnectionInterface; use Illuminate\Support\Arr; abstract class DatabaseInspectionCommand extends Command { /** * Get a human-readable name for the given connection. * * @param \Illuminate\Database\ConnectionInterface $connection * @param string $database * @return string * * @deprecated */ protected function getConnectionName(ConnectionInterface $connection, $database) { return $connection->getDriverTitle(); } /** * Get the number of open connections for a database. * * @param \Illuminate\Database\ConnectionInterface $connection * @return int|null * * @deprecated */ protected function getConnectionCount(ConnectionInterface $connection) { return $connection->threadCount(); } /** * Get the connection configuration details for the given connection. * * @param string|null $database * @return array */ protected function getConfigFromDatabase($database) { $database ??= config('database.default'); return Arr::except(config('database.connections.'.$database), ['password']); } }