database.php 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <?php
  2. return array(
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Database Query Logging
  6. |--------------------------------------------------------------------------
  7. |
  8. | By default, the SQL, bindings, and execution time are logged in an array
  9. | for you to review. They can be retrieved via the DB::profile() method.
  10. | However, in some situations, you may want to disable logging for
  11. | ultra high-volume database work. You can do so here.
  12. |
  13. */
  14. 'profile' => true,
  15. /*
  16. |--------------------------------------------------------------------------
  17. | PDO Fetch Style
  18. |--------------------------------------------------------------------------
  19. |
  20. | By default, database results will be returned as instances of the PHP
  21. | stdClass object; however, you may wish to retrieve records as arrays
  22. | instead of objects. Here you can control the PDO fetch style of the
  23. | database queries run by your application.
  24. |
  25. */
  26. 'fetch' => PDO::FETCH_CLASS,
  27. /*
  28. |--------------------------------------------------------------------------
  29. | Default Database Connection
  30. |--------------------------------------------------------------------------
  31. |
  32. | The name of your default database connection. This connection will be used
  33. | as the default for all database operations unless a different name is
  34. | given when performing said operation. This connection name should be
  35. | listed in the array of connections below.
  36. |
  37. */
  38. 'default' => 'mysql',
  39. /*
  40. |--------------------------------------------------------------------------
  41. | Database Connections
  42. |--------------------------------------------------------------------------
  43. |
  44. | All of the database connections used by your application. Many of your
  45. | applications will no doubt only use one connection; however, you have
  46. | the freedom to specify as many connections as you can handle.
  47. |
  48. | All database work in Laravel is done through the PHP's PDO facilities,
  49. | so make sure you have the PDO drivers for your particular database of
  50. | choice installed on your machine.
  51. |
  52. */
  53. 'connections' => array(
  54. 'sqlite' => array(
  55. 'driver' => 'sqlite',
  56. 'database' => 'application',
  57. 'prefix' => '',
  58. ),
  59. 'mysql' => array(
  60. 'driver' => 'mysql',
  61. 'host' => 'localhost',
  62. 'database' => 'database',
  63. 'username' => 'root',
  64. 'password' => '',
  65. 'charset' => 'utf8',
  66. 'prefix' => '',
  67. ),
  68. 'pgsql' => array(
  69. 'driver' => 'pgsql',
  70. 'host' => 'localhost',
  71. 'database' => 'database',
  72. 'username' => 'root',
  73. 'password' => '',
  74. 'charset' => 'utf8',
  75. 'prefix' => '',
  76. 'schema' => 'public',
  77. ),
  78. 'sqlsrv' => array(
  79. 'driver' => 'sqlsrv',
  80. 'host' => 'localhost',
  81. 'database' => 'database',
  82. 'username' => 'root',
  83. 'password' => '',
  84. 'prefix' => '',
  85. ),
  86. ),
  87. /*
  88. |--------------------------------------------------------------------------
  89. | Redis Databases
  90. |--------------------------------------------------------------------------
  91. |
  92. | Redis is an open source, fast, and advanced key-value store. However, it
  93. | provides a richer set of commands than a typical key-value store such as
  94. | APC or memcached. All the cool kids are using it.
  95. |
  96. | To get the scoop on Redis, check out: http://redis.io
  97. |
  98. */
  99. 'redis' => array(
  100. 'default' => array(
  101. 'host' => '127.0.0.1',
  102. 'port' => 6379,
  103. 'database' => 0
  104. ),
  105. ),
  106. );