2017 © Pedro Peláez
 

library glue-database

Use mrjgreen/database in Glue

image

gluephp/glue-database

Use mrjgreen/database in Glue

  • Friday, May 6, 2016
  • by gluephp
  • Repository
  • 1 Watchers
  • 0 Stars
  • 71 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Database for Glue

Use mrjgreen/database with gluephp/glue, (*1)

Installation

Use Composer:, (*2)

$ composer require gluephp/glue-database

Configuration

$app = new Glue\App;

$app->config->override([
    'database' => [
        'driver'    => 'mysql',
        'host'      => 'localhost',
        'username'  => 'root',
        'password'  => 'password',
        'charset'   => 'utf8',
        'collation' => 'utf8_unicode_ci',
    ]
]);

More configuration options can be found at https://github.com/mrjgreen/database, (*3)

Register

$app->register(
    new Glue\Database\ServiceProvider()
);

Get the Database Connection instance

Once the service provider is registered, you can fetch the Whoops instance with:, (*4)

$db = $app->make('Database\Connection');

or use the alias:, (*5)

$db = $app->db;

The Versions

06/05 2016

dev-master

9999999-dev

Use mrjgreen/database in Glue

  Sources   Download

MIT

The Requires

 

by Magnus Eriksson

06/05 2016

dev-develop

dev-develop

Use mrjgreen/database in Glue

  Sources   Download

MIT

The Requires

 

by Magnus Eriksson

06/05 2016

0.1.0

0.1.0.0

Use mrjgreen/database in Glue

  Sources   Download

MIT

The Requires

 

by Magnus Eriksson