database.php 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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 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 particlar 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. ),
  77. 'sqlsrv' => array(
  78. 'driver' => 'sqlsrv',
  79. 'host' => 'localhost',
  80. 'database' => 'database',
  81. 'username' => 'root',
  82. 'password' => '',
  83. 'prefix' => '',
  84. ),
  85. ),
  86. /*
  87. |--------------------------------------------------------------------------
  88. | Redis Databases
  89. |--------------------------------------------------------------------------
  90. |
  91. | Redis is an open source, fast, and advanced key-value store. However, it
  92. | provides a richer set of commands than a typical key-value store such as
  93. | APC or memcached. All the cool kids are using it.
  94. |
  95. | To get the scoop on Redis, check out: http://redis.io
  96. |
  97. */
  98. 'redis' => array(
  99. 'default' => array(
  100. 'host' => '127.0.0.1',
  101. 'port' => 6379,
  102. 'database' => 0
  103. ),
  104. ),
  105. );