PageRenderTime 34ms CodeModel.GetById 24ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/config/database.php

https://bitbucket.org/mdoviedor/hotelium
PHP | 114 lines | 57 code | 12 blank | 45 comment | 0 complexity | c24af20abb4a07f1f6d9cf0387b52361 MD5 | raw file
  1<?php
  2
  3return [
  4    /*
  5    |--------------------------------------------------------------------------
  6    | Default Database Connection Name
  7    |--------------------------------------------------------------------------
  8    |
  9    | Here you may specify which of the database connections below you wish
 10    | to use as your default connection for all database work. Of course
 11    | you may use many connections at once using the Database library.
 12    |
 13    */
 14
 15    'default' => env('DB_CONNECTION', 'mysql'),
 16
 17    /*
 18    |--------------------------------------------------------------------------
 19    | Database Connections
 20    |--------------------------------------------------------------------------
 21    |
 22    | Here are each of the database connections setup for your application.
 23    | Of course, examples of configuring each database platform that is
 24    | supported by Laravel is shown below to make development simple.
 25    |
 26    |
 27    | All database work in Laravel is done through the PHP PDO facilities
 28    | so make sure you have the driver for your particular database of
 29    | choice installed on your machine before you begin development.
 30    |
 31    */
 32
 33    'connections' => [
 34        'sqlite' => [
 35            'driver' => 'sqlite',
 36            'database' => env('DB_DATABASE', database_path('database.sqlite')),
 37            'prefix' => '',
 38        ],
 39
 40        'mysql' => [
 41            'driver' => 'mysql',
 42            'host' => env('DB_HOST', '127.0.0.1'),
 43            'port' => env('DB_PORT', '3306'),
 44            'database' => env('DB_DATABASE', 'forge'),
 45            'username' => env('DB_USERNAME', 'forge'),
 46            'password' => env('DB_PASSWORD', ''),
 47            'unix_socket' => env('DB_SOCKET', ''),
 48            'charset' => 'utf8mb4',
 49            'collation' => 'utf8mb4_unicode_ci',
 50            'prefix' => '',
 51            'strict' => true,
 52            'engine' => null,
 53        ],
 54
 55        'pgsql' => [
 56            'driver' => 'pgsql',
 57            'host' => env('DB_HOST', '127.0.0.1'),
 58            'port' => env('DB_PORT', '5432'),
 59            'database' => env('DB_DATABASE', 'forge'),
 60            'username' => env('DB_USERNAME', 'forge'),
 61            'password' => env('DB_PASSWORD', ''),
 62            'charset' => 'utf8',
 63            'prefix' => '',
 64            'schema' => 'public',
 65            'sslmode' => 'prefer',
 66        ],
 67
 68        'sqlsrv' => [
 69            'driver' => 'sqlsrv',
 70            'host' => env('DB_HOST', 'localhost'),
 71            'port' => env('DB_PORT', '1433'),
 72            'database' => env('DB_DATABASE', 'forge'),
 73            'username' => env('DB_USERNAME', 'forge'),
 74            'password' => env('DB_PASSWORD', ''),
 75            'charset' => 'utf8',
 76            'prefix' => '',
 77        ],
 78    ],
 79
 80    /*
 81    |--------------------------------------------------------------------------
 82    | Migration Repository Table
 83    |--------------------------------------------------------------------------
 84    |
 85    | This table keeps track of all the migrations that have already run for
 86    | your application. Using this information, we can determine which of
 87    | the migrations on disk haven't actually been run in the database.
 88    |
 89    */
 90
 91    'migrations' => 'migrations',
 92
 93    /*
 94    |--------------------------------------------------------------------------
 95    | Redis Databases
 96    |--------------------------------------------------------------------------
 97    |
 98    | Redis is an open source, fast, and advanced key-value store that also
 99    | provides a richer set of commands than a typical key-value systems
100    | such as APC or Memcached. Laravel makes it easy to dig right in.
101    |
102    */
103
104    'redis' => [
105        'client' => 'predis',
106
107        'default' => [
108            'host' => env('REDIS_HOST', '127.0.0.1'),
109            'password' => env('REDIS_PASSWORD', null),
110            'port' => env('REDIS_PORT', 6379),
111            'database' => 0,
112        ],
113    ],
114];