Loading...
Loading...

MariaDB/MySQL Database Connection Generator

integrate database connection to your application

mariadb-database-connect

Provide an access to database tables from your Laminas application. Use and retrieve your Datbase class in TableGateway way available from Service Manager via key: Laminas\Db\Adapter\Adapter and Laminas\Db\TableGateway\TableGateway .

Required Laminas Components

  1. laminas/laminas-db

On-line Generator

Setup Instructions

  1. Copy and paste file contents of global.php into config/autload/global.php
  2. Copy and paste file contents of local.php into config/autload/local.php
  3. Enter your database user and password credential to your copied local.php file.

Throubleshooting

Make sure your application contains all the required plugins from "Required Laminas Components" and "Required Laminas Kit Components".
You can learn how to add missing dependencies in this video:
aa

Parameters

Param name Type Default value Description
db_host text NULL Sets a database host name
db_name text NULL Sets a database name

CLI Usage

"vendor/bin/laminas.bat" mvc:mariadb_database_connect <db_host> <db_name>

Example Usage

"vendor/bin/laminas.bat" mvc:mariadb_database_connect localhost laminas_db

Learn more with Laminas Book:

Laminas MVC: the most innovative framework in PHP - get a book on Amazon

Need help? Checkout our setup page, video tutorials or ask questions on our forum!

Help Tutorials Forum
TOP