Skip to content

Why doesn't Schema::getFacadeAccessor return a string? #29818

@CyberiaResurrection

Description

@CyberiaResurrection
  • Laravel Version: 5.8.34
  • PHP Version: 7.2.21
  • Database Driver & Version: N/A

Description:

Per #25525 and implied by \Illuminate\Support\Facades\Facade::swap() (as below),

    public static function swap($instance)
    {
        static::$resolvedInstance[static::getFacadeAccessor()] = $instance;

        if (isset(static::$app)) {
            static::$app->instance(static::getFacadeAccessor(), $instance);
        }
    }

Why does \Illuminate\Support\Facades\Schema return a schema Builder rather than a string, like the vast bulk, if not all, of the other defined facade classes in the core framework?

Steps To Reproduce:

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions