FactoryGenerator
final class FactoryGenerator extends Generator implements GeneratorInterface (View source)
Generator for dist/database/factories/*.php.
Constants
| private INDENT |
The left padding for the body of the generated. |
Properties
| protected string | $stub | from Generator | |
| protected string|null | $namespace | from Generator |
Methods
__construct(Table $table, string|null $namespace = null, string|null $destination = null)
No description
from
Generator
void
run(bool $force = false)
Run the generator logic and save it to a file.
Details
protected
__construct(Table $table, string|null $namespace = null, string|null $destination = null)
No description
protected void
loadStub(string $filename)
No description
protected void
defaultDestination(string $path)
No description
protected void
defaultNamespace(string $namespace)
No description
protected string
qualifyModel(string $class)
No description
protected void
write(string $filename, string $content, bool $force = false)
No description
protected string
read(string $filename)
No description
protected string
replace(array $search, array $replace)
No description
void
run(bool $force = false)
Run the generator logic and save it to a file.
static void
make(Table $table, string|null $namespace = null, string|null $destination = null)
Create a instance.