Returns the current connection or false
static public connection ( ) : mixed | ||
return | mixed |
The examples above are using PHP's built-in database connection functions and do not require any external package/library. However, there are external libraries that can make working with databases in PHP even easier and more efficient, such as Doctrine, Eloquent, and PDO.