class
Illuminate
/
Database
/
Console
/
MonitorCommand
MonitorCommand
Extends
Properties
protected
$signature string
The name and signature of the console command.
Default: 'db:monitor
{--databases= : The database connections to monitor}
{--max= : The maximum number of connections that can be open before an event is dispatched}'
protected
$description string
The console command description.
Default: 'Monitor the number of connections on the specified database'
Methods
public
__construct ( ConnectionResolverInterface $connection , Dispatcher $events , Composer $composer ) : void
Create a new command instance.
Parameters
- $connection ConnectionResolverInterface
- $events Dispatcher
- $composer Composer
public
handle ( ) : void
Execute the console command.
protected
parseDatabases ( $databases ) : Illuminate\...\Collection
Parse the database into an array of the connections.
Parameters
- $databases string
protected
displayConnections ( $databases ) : void
Display the databases and their connection counts in the console.
Parameters
- $databases Illuminate\...\Collection
protected
dispatchEvents ( $databases ) : void
Dispatch the database monitoring events.
Parameters
- $databases Illuminate\...\Collection