Mercurial > packages > framework
view src/Database/MySchema.php @ 4:84c75d9d90be
Changing usage to be bootstrap 5, not everything is reviewed but it's been started
| author | luka |
|---|---|
| date | Tue, 19 Aug 2025 20:33:35 -0400 |
| parents | b44434aaa767 |
| children |
line wrap: on
line source
<?php namespace Wizard\Framework\Database; use Illuminate\Database\Schema\Builder; use Illuminate\Support\Facades\Schema as BaseSchema; class MySchema extends BaseSchema { /** * Get a schema builder instance for a connection. * * @param string|null $name */ public static function connection($name): Builder { return self::customizedSchemaBuilder($name); } /** * Retrieves an instance of the schema `Builder` with a customized `Blueprint` class. */ public static function customizedSchemaBuilder(?string $name = null): Builder { /** @var Builder $builder */ $builder = static::$app['db']->connection($name)->getSchemaBuilder(); $builder->blueprintResolver(static fn ($table, $callback, $prefix) => new MyBlueprint($table, $callback, $prefix)); return $builder; } }
