database.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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. | Default Database Connection
  18. |--------------------------------------------------------------------------
  19. |
  20. | The name of your default database connection. This connection will used
  21. | as the default for all database operations unless a different name is
  22. | given when performing said operation. This connection name should be
  23. | listed in the array of connections below.
  24. |
  25. */
  26. 'default' => 'mysql',
  27. /*
  28. |--------------------------------------------------------------------------
  29. | Database Connections
  30. |--------------------------------------------------------------------------
  31. |
  32. | All of the database connections used by your application. Many of your
  33. | applications will no doubt only use one connection; however, you have
  34. | the freedom to specify as many connections as you can handle.
  35. |
  36. | All database work in Laravel is done through the PHP's PDO facilities,
  37. | so make sure you have the PDO drivers for your particlar database of
  38. | choice installed on your machine.
  39. |
  40. | Drivers: 'mysql', 'pgsql', 'sqlsrv', 'sqlite'.
  41. |
  42. */
  43. 'connections' => array(
  44. 'sqlite' => array(
  45. 'driver' => 'sqlite',
  46. 'database' => 'application',
  47. 'prefix' => '',
  48. ),
  49. 'mysql' => array(
  50. 'driver' => 'mysql',
  51. 'host' => 'localhost',
  52. 'database' => 'database',
  53. 'username' => 'root',
  54. 'password' => '',
  55. 'charset' => 'utf8',
  56. 'prefix' => '',
  57. ),
  58. 'pgsql' => array(
  59. 'driver' => 'pgsql',
  60. 'host' => 'localhost',
  61. 'database' => 'database',
  62. 'username' => 'root',
  63. 'password' => '',
  64. 'charset' => 'utf8',
  65. 'prefix' => '',
  66. ),
  67. 'sqlsrv' => array(
  68. 'driver' => 'sqlsrv',
  69. 'host' => 'localhost',
  70. 'database' => 'database',
  71. 'username' => 'root',
  72. 'password' => '',
  73. 'prefix' => '',
  74. ),
  75. ),
  76. /*
  77. |--------------------------------------------------------------------------
  78. | Redis Databases
  79. |--------------------------------------------------------------------------
  80. |
  81. | Redis is an open source, fast, and advanced key-value store. However, it
  82. | provides a richer set of commands than a typical key-value store such as
  83. | APC or memcached. All the cool kids are using it.
  84. |
  85. | To get the scoop on Redis, check out: http://redis.io
  86. |
  87. */
  88. 'redis' => array(
  89. 'default' => array('host' => '127.0.0.1', 'port' => 6379),
  90. ),
  91. );