class Illuminate / Database / Capsule / Manager
You are viewing an older version of the documentation. For the latest, please visit master documentation.

Manager

Uses

Properties

protected

$manager DatabaseManager

The database manager instance.

Default: null

Methods

public

__construct ( Container $container ) : void

Create a new database capsule manager.

Parameters

protected

setupDefaultConfiguration ( ) : void

Setup the default database configuration options.

protected

setupManager ( ) : void

Build the database manager instance.

public static

connection ( $connection ) : Connection

Get a connection instance from the global manager.

Parameters

  • $connection string|null
public static

table ( $table , $as , $connection ) : Builder

Get a fluent query builder instance.

Parameters

public static

schema ( $connection ) : Builder

Get a schema builder instance.

Parameters

  • $connection string|null
public

getConnection ( $name ) : Connection

Get a registered connection instance.

Parameters

  • $name string|null
public

addConnection ( array $config , $name ) : void

Register a connection with the manager.

Parameters

  • $config array
  • $name string
public

bootEloquent ( ) : void

Bootstrap Eloquent so it is ready for usage.

public

setFetchMode ( $fetchMode ) : $this

Set the fetch mode for the database connections.

Parameters

  • $fetchMode int
public

getDatabaseManager ( ) : DatabaseManager

Get the database manager instance.

public

getEventDispatcher ( ) : Dispatcher |null

Get the current event dispatcher instance.

public

setEventDispatcher ( Dispatcher $dispatcher ) : void

Set the event dispatcher instance to be used by connections.

Parameters

public static

__callStatic ( $method , $parameters ) : mixed

Dynamically pass methods to the default connection.

Parameters

  • $method string
  • $parameters array