database.php 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <?php
  2. return array(
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Default Database Connection
  6. |--------------------------------------------------------------------------
  7. |
  8. | The name of your default database connection. This connection will used
  9. | as the default for all database operations unless a different name is
  10. | given when performing said operation. This connection name should be
  11. | listed in the array of connections below.
  12. |
  13. */
  14. 'default' => 'sqlite',
  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. | 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' => 'password',
  55. 'charset' => 'utf8',
  56. 'prefix' => '',
  57. ),
  58. 'pgsql' => array(
  59. 'driver' => 'pgsql',
  60. 'host' => 'localhost',
  61. 'database' => 'database',
  62. 'username' => 'root',
  63. 'password' => 'password',
  64. 'charset' => 'utf8',
  65. 'prefix' => '',
  66. ),
  67. 'sqlsrv' => array(
  68. 'driver' => 'sqlsrv',
  69. 'host' => 'localhost',
  70. 'database' => 'database',
  71. 'username' => 'root',
  72. 'password' => '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. );