Skip to content

Instantly share code, notes, and snippets.

@mtangoo
Forked from SilverFire/config.php
Created October 5, 2016 08:01
Show Gist options
  • Select an option

  • Save mtangoo/94f0618b8e14ec7750ee9b9237ccc76d to your computer and use it in GitHub Desktop.

Select an option

Save mtangoo/94f0618b8e14ec7750ee9b9237ccc76d to your computer and use it in GitHub Desktop.

Revisions

  1. @SilverFire SilverFire created this gist Oct 24, 2015.
    16 changes: 16 additions & 0 deletions config.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    <?php

    return [
    'components' => [
    'db' => [
    'class' => '\yii\db\Connection',
    'dsn' => 'mysql:host=127.0.0.1;dbname=demo',
    'username' => 'root',
    'password' => '',
    'charset' => 'utf8',
    'on afterOpen' => function($event) {
    $event->sender->createCommand("SET time_zone='+00:00';")->execute();
    },
    ],
    ]
    ]