database.php 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <?php
  2. return array(
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Default Database Connection
  6. |--------------------------------------------------------------------------
  7. |
  8. | The name of your default database connection.
  9. |
  10. | This connection will be the default for all database operations unless a
  11. | different connection is specified when performing the operation.
  12. |
  13. */
  14. 'default' => 'sqlite',
  15. /*
  16. |--------------------------------------------------------------------------
  17. | Database Connections
  18. |--------------------------------------------------------------------------
  19. |
  20. | All of the database connections used by your application.
  21. |
  22. | Supported Drivers: 'mysql', 'pgsql', 'sqlite'.
  23. |
  24. | Note: When using the SQLite driver, the path and "sqlite" extention will
  25. | be added automatically. You only need to specify the database name.
  26. |
  27. | Using a driver that isn't supported? You can still establish a PDO
  28. | connection. Simply specify a driver and DSN option:
  29. |
  30. | 'odbc' => array(
  31. | 'driver' => 'odbc',
  32. | 'dsn' => 'your-dsn',
  33. | 'username' => 'username',
  34. | 'password' => 'password',
  35. | )
  36. |
  37. | Note: When using an unsupported driver, Eloquent and the fluent query
  38. | builder may not work as expected.
  39. |
  40. */
  41. 'connections' => array(
  42. 'sqlite' => array(
  43. 'driver' => 'sqlite',
  44. 'database' => 'application',
  45. ),
  46. 'mysql' => array(
  47. 'driver' => 'mysql',
  48. 'host' => 'localhost',
  49. 'database' => 'database',
  50. 'username' => 'root',
  51. 'password' => 'password',
  52. 'charset' => 'utf8',
  53. ),
  54. 'pgsql' => array(
  55. 'driver' => 'pgsql',
  56. 'host' => 'localhost',
  57. 'database' => 'database',
  58. 'username' => 'root',
  59. 'password' => 'password',
  60. 'charset' => 'utf8',
  61. ),
  62. ),
  63. /*
  64. |--------------------------------------------------------------------------
  65. | Redis Databases
  66. |--------------------------------------------------------------------------
  67. |
  68. | Redis is an open source, fast, and advanced key-value store. However, it
  69. | provides a richer set of commands than a typical key-value store such as
  70. | APC or memcached.
  71. |
  72. | Here you may specify the hosts and ports for your Redis databases.
  73. |
  74. | For more information regarding Redis, check out: http://redis.io
  75. |
  76. */
  77. 'redis' => array(
  78. 'default' => array('host' => '127.0.0.1', 'port' => 6379),
  79. ),
  80. );