You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Schema.php 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. namespace Illuminate\Support\Facades;
  3. /**
  4. * @method static \Illuminate\Database\Schema\Builder create(string $table, \Closure $callback)
  5. * @method static \Illuminate\Database\Schema\Builder drop(string $table)
  6. * @method static \Illuminate\Database\Schema\Builder dropIfExists(string $table)
  7. * @method static \Illuminate\Database\Schema\Builder table(string $table, \Closure $callback)
  8. * @method static void defaultStringLength(int $length)
  9. * @method static \Illuminate\Database\Schema\Builder disableForeignKeyConstraints()
  10. * @method static \Illuminate\Database\Schema\Builder enableForeignKeyConstraints()
  11. *
  12. * @see \Illuminate\Database\Schema\Builder
  13. */
  14. class Schema extends Facade
  15. {
  16. /**
  17. * Get a schema builder instance for a connection.
  18. *
  19. * @param string $name
  20. * @return \Illuminate\Database\Schema\Builder
  21. */
  22. public static function connection($name)
  23. {
  24. return static::$app['db']->connection($name)->getSchemaBuilder();
  25. }
  26. /**
  27. * Get a schema builder instance for the default connection.
  28. *
  29. * @return \Illuminate\Database\Schema\Builder
  30. */
  31. protected static function getFacadeAccessor()
  32. {
  33. return static::$app['db']->connection()->getSchemaBuilder();
  34. }
  35. }