class
Illuminate
/
Database
/
Console
/
DbCommand
DbCommand
Extends
Properties
protected
$signature string
The name and signature of the console command.
Default: 'db {connection? : The database connection that should be used}
{--read : Connect to the read connection}
{--write : Connect to the write connection}'
protected
$description string
The console command description.
Default: 'Start a new database CLI session'
Methods
public
handle ( ) : int
Execute the console command.
public
getConnection ( ) : array
Get the database connection configuration.
public
commandArguments ( array $connection ) : array
Get the arguments for the database client command.
Parameters
- $connection array
public
commandEnvironment ( array $connection ) : array|null
Get the environment variables for the database client command.
Parameters
- $connection array
public
getCommand ( array $connection ) : string
Get the database client command to run.
Parameters
- $connection array
protected
getMysqlArguments ( array $connection ) : array
Get the arguments for the MySQL CLI.
Parameters
- $connection array
protected
getPgsqlArguments ( array $connection ) : array
Get the arguments for the Postgres CLI.
Parameters
- $connection array
protected
getSqliteArguments ( array $connection ) : array
Get the arguments for the SQLite CLI.
Parameters
- $connection array
protected
getSqlsrvArguments ( array $connection ) : array
Get the arguments for the SQL Server CLI.
Parameters
- $connection array
protected
getPgsqlEnvironment ( array $connection ) : array|null
Get the environment variables for the Postgres CLI.
Parameters
- $connection array
protected
getOptionalArguments ( array $args , array $connection ) : array
Get the optional arguments based on the connection configuration.
Parameters
- $args array
- $connection array