DatabaseSeed
extends AbstractDatabaseSeedCommand
in package
This command will populate all the database tables, it's useful during the development or testing phase.
By default this command will ask if you want to proceed for every configured Seeder. If you want to just seed all seeders you should pass -A or --all flag If you want to assume yes to every question just pass the -Y or --yes flag
Examples: artisan bennu:seed-database artisan bennu:seed-database -A artisan bennu:seed-database --all
DON'T USE THIS COMMAND IN PRODUCTION
Table of Contents
- $description : string
- Command description
- $seeders : array<string|int, mixed>
- The configured list of seeders.
- $signature : string
- Command signature
- $silent : bool
- Suppress all info,error,warn and printWelcome output messages use `$this->line` instead to force writing output in silent mode
- __construct() : mixed
- Constructor, it will start a new batch to group all log items
- call() : int
- Call another console command.
- error() : void
- Print an <error>$string</error> message
- handle() : void
- This function will handle all the logic of the command
- info() : void
- Print an <info>$string</info> message
- warn() : void
- Print an <error>$string</error> message
- printWelcome() : bool
- Prints a Welcome message
Properties
$description
Command description
protected
string
$description
= "This command will populate the database tables, using dummy data"
$seeders
The configured list of seeders.
protected
array<string|int, mixed>
$seeders
= [
// System
\Athomos\System\Seeders\SystemSeeder::class,
// Crm
\Athomos\Bennu\Modules\Crm\Seeders\CrmSeeder::class,
// Cloud
\Athomos\Bennu\Modules\Cloud\Common\Seeders\CommonSeeder::class,
\Athomos\Bennu\Modules\Cloud\OpenStack\Identity\Seeders\IdentitySeeder::class,
\Athomos\Bennu\Modules\Cloud\OpenStack\Compute\Seeders\ComputeSeeder::class,
\Athomos\Bennu\Modules\Cloud\OpenStack\BlockStorage\Seeders\BlockStorageSeeder::class,
\Athomos\Bennu\Modules\Cloud\OpenStack\Networking\Seeders\NetworkingSeeder::class,
]
$signature
Command signature
protected
string
$signature
= "bennu:db-seed {--A|all} {--Y|yes}"
$silent
Suppress all info,error,warn and printWelcome output messages use `$this->line` instead to force writing output in silent mode
protected
bool
$silent
= false
Methods
__construct()
Constructor, it will start a new batch to group all log items
public
__construct() : mixed
Return values
mixed —call()
Call another console command.
public
call( $command[, array<string|int, mixed> $arguments = [] ]) : int
Parameters
Return values
int —error()
Print an <error>$string</error> message
public
error( $string[, $verbosity = null ]) : void
Parameters
Return values
void —handle()
This function will handle all the logic of the command
public
handle([bool $A = false ][, bool $Y = false ]) : void
Parameters
- $A : bool = false
- $Y : bool = false
Return values
void —info()
Print an <info>$string</info> message
public
info( $string[, $verbosity = null ]) : void
Parameters
Return values
void —warn()
Print an <error>$string</error> message
public
warn( $string[, $verbosity = null ]) : void
Parameters
Return values
void —printWelcome()
Prints a Welcome message
protected
printWelcome([string|null $message = null ][, bool $assumeYes = false ]) : bool
Parameters
- $message : string|null = null
- $assumeYes : bool = false