Database
class Database
Properties
| static | $orm |
Methods
static Manager
orm()
Get the ORM instance.
static bool
hasConnection(string $name)
Determines if a connection is defined in the ORM.
static mixed
tenant()
Shortcut for tenant connection.
static bool
tableExists(string $table, string $connection = "tenant")
Determines if table exists
static mixed
transaction(closure $closure, string $connection = "tenant")
Starts and wraps the code inside a database transaction.
static mixed
__callStatic(string $name, array $arguments)
Allows you to call the ORM's static methods through the Database class
Details
at line 17
static Manager
orm()
Get the ORM instance.
at line 38
static bool
hasConnection(string $name)
Determines if a connection is defined in the ORM.
at line 53
static mixed
tenant()
Shortcut for tenant connection.
at line 65
static bool
tableExists(string $table, string $connection = "tenant")
Determines if table exists
at line 86
static mixed
transaction(closure $closure, string $connection = "tenant")
Starts and wraps the code inside a database transaction.
NOTE: Requires a compatible storage engine. $closure must ever return true on success, otherwise result will always be false $closure will have the transaction stdClass as first argument
at line 116
static mixed
__callStatic(string $name, array $arguments)
Allows you to call the ORM's static methods through the Database class