abstract class Seeder (View source)

Properties

protected Container $container

The container instance.

protected Command $command

The console command instance.

Methods

$this
call(array|string $class, bool $silent = false)

Seed the given connection from the given path.

void
callSilent(array|string $class)

Silently seed the given connection from the given path.

resolve(string $class)

Resolve an instance of the given seeder class.

$this
setContainer(Container $container)

Set the IoC container instance.

$this
setCommand(Command $command)

Set the console command instance.

mixed
__invoke()

Run the database seeds.

Details

$this call(array|string $class, bool $silent = false)

Seed the given connection from the given path.

Parameters

array|string $class
bool $silent

Return Value

$this

void callSilent(array|string $class)

Silently seed the given connection from the given path.

Parameters

array|string $class

Return Value

void

protected Seeder resolve(string $class)

Resolve an instance of the given seeder class.

Parameters

string $class

Return Value

Seeder

$this setContainer(Container $container)

Set the IoC container instance.

Parameters

Container $container

Return Value

$this

$this setCommand(Command $command)

Set the console command instance.

Parameters

Command $command

Return Value

$this

mixed __invoke()

Run the database seeds.

Return Value

mixed

Exceptions

InvalidArgumentException