Просмотр файла vendor/laravel/framework/src/Illuminate/Support/Facades/Schema.php

Размер файла: 1.88Kb
  1. <?php
  2.  
  3. namespace Illuminate\Support\Facades;
  4.  
  5. /**
  6. * @method static \Illuminate\Database\Schema\Builder create(string $table, \Closure $callback)
  7. * @method static \Illuminate\Database\Schema\Builder createDatabase(string $name)
  8. * @method static \Illuminate\Database\Schema\Builder disableForeignKeyConstraints()
  9. * @method static \Illuminate\Database\Schema\Builder drop(string $table)
  10. * @method static \Illuminate\Database\Schema\Builder dropDatabaseIfExists(string $name)
  11. * @method static \Illuminate\Database\Schema\Builder dropIfExists(string $table)
  12. * @method static \Illuminate\Database\Schema\Builder enableForeignKeyConstraints()
  13. * @method static \Illuminate\Database\Schema\Builder rename(string $from, string $to)
  14. * @method static \Illuminate\Database\Schema\Builder table(string $table, \Closure $callback)
  15. * @method static bool hasColumn(string $table, string $column)
  16. * @method static bool hasColumns(string $table, array $columns)
  17. * @method static bool dropColumns(string $table, array $columns)
  18. * @method static bool hasTable(string $table)
  19. * @method static void defaultStringLength(int $length)
  20. * @method static void registerCustomDoctrineType(string $class, string $name, string $type)
  21. * @method static array getColumnListing(string $table)
  22. *
  23. * @see \Illuminate\Database\Schema\Builder
  24. */
  25. class Schema extends Facade
  26. {
  27. /**
  28. * Get a schema builder instance for a connection.
  29. *
  30. * @param string|null $name
  31. * @return \Illuminate\Database\Schema\Builder
  32. */
  33. public static function connection($name)
  34. {
  35. return static::$app['db']->connection($name)->getSchemaBuilder();
  36. }
  37.  
  38. /**
  39. * Get a schema builder instance for the default connection.
  40. *
  41. * @return \Illuminate\Database\Schema\Builder
  42. */
  43. protected static function getFacadeAccessor()
  44. {
  45. return static::$app['db']->connection()->getSchemaBuilder();
  46. }
  47. }