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 bool
tableExists(string $table, string $connection = "default")
Determines if table exists
static mixed
transaction(closure $closure, string $connection = "default")
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 56
static bool
tableExists(string $table, string $connection = "default")
Determines if table exists
at line 78
static mixed
transaction(closure $closure, string $connection = "default")
Starts and wraps the code inside a database transaction.
NOTE: Requires a compatible storage engine. $closure must return true on success: any other return value, or a thrown exception, rolls back everything the closure did within the transaction. $closure will have the transaction stdClass as first argument
at line 113
static mixed
__callStatic(string $name, array $arguments)
Allows you to call the ORM's static methods through the Database class