/
githubmirror
/
framework
Обзор
Документация
Войти
/
githubmirror
/
framework
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
13.x
src/Illuminate/Database/Schema/SqlServerBuilder.php
40 строк
875 B
Hafez Divandari
[12.x] Fix accessing `Connection` property in `Grammar` classes (#54487)
12 фев 2025, 19:30
Не верифицирован
12 фев 2025, 19:30
c78fa3d
Код
Авторство
О чём код?
<?php namespace Illuminate\Database\Schema; use Illuminate\Support\Arr; class SqlServerBuilder extends Builder { /** * Drop all tables from the database. * * @return void */ public function dropAllTables() { $this->connection->statement($this->grammar->compileDropAllForeignKeys()); $this->connection->statement($this->grammar->compileDropAllTables()); } /** * Drop all views from the database. * * @return void */ public function dropAllViews() { $this->connection->statement($this->grammar->compileDropAllViews()); } /** * Get the default schema name for the connection. * * @return string|null */ public function getCurrentSchemaName() { return Arr::first($this->getSchemas(), fn ($schema) => $schema['default'])['name']; } }