database.php 2.3 KB

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