Laralib\L5scaffold\Makes\MakeMigration::replaceSchema PHP Method

replaceSchema() protected method

Replace the schema for the stub.
protected replaceSchema ( string &$stub )
$stub string
    protected function replaceSchema(&$stub)
    {
        if ($schema = $this->scaffoldCommandObj->getMeta()['schema']) {
            $schema = (new SchemaParser())->parse($schema);
        }
        $schema = (new SyntaxBuilder())->create($schema, $this->scaffoldCommandObj->getMeta());
        $stub = str_replace(['{{schema_up}}', '{{schema_down}}'], $schema, $stub);
        return $this;
    }