pastebin - collaborative debugging tool
php.kpaste.net RSS


/var/www/html/config/database.php
Posted by Anonymous on Tue 29th Mar 2016 10:49
raw | new post

  1. <?php
  2.  
  3. return [
  4.  
  5.     /*
  6.     |--------------------------------------------------------------------------
  7.     | PDO Fetch Style
  8.     |--------------------------------------------------------------------------
  9.     |
  10.     | By default, database results will be returned as instances of the PHP
  11.     | stdClass object; however, you may desire to retrieve records in an
  12.     | array format for simplicity. Here you can tweak the fetch style.
  13.     |
  14.     */
  15.  
  16.     'fetch' => PDO::FETCH_CLASS,
  17.  
  18.     /*
  19.     |--------------------------------------------------------------------------
  20.     | Default Database Connection Name
  21.     |--------------------------------------------------------------------------
  22.     |
  23.     | Here you may specify which of the database connections below you wish
  24.     | to use as your default connection for all database work. Of course
  25.     | you may use many connections at once using the Database library.
  26.     |
  27.     */
  28.  
  29.     'default' => env('DB_CONNECTION', 'mysql'),
  30.  
  31.     /*
  32.     |--------------------------------------------------------------------------
  33.     | Database Connections
  34.     |--------------------------------------------------------------------------
  35.     |
  36.     | Here are each of the database connections setup for your application.
  37.     | Of course, examples of configuring each database platform that is
  38.     | supported by Laravel is shown below to make development simple.
  39.     |
  40.     |
  41.     | All database work in Laravel is done through the PHP PDO facilities
  42.     | so make sure you have the driver for your particular database of
  43.     | choice installed on your machine before you begin development.
  44.     |
  45.     */
  46.  
  47.     'connections' => [
  48.  
  49.         'sqlite' => [
  50.             'driver'   => 'sqlite',
  51.             'database' => database_path('database.sqlite'),
  52.             'prefix'   => '',
  53.         ],
  54.  
  55.         'mysql' => [
  56.             'driver'    => 'mysql',
  57.                         /* 'unix_socket' => '/Applications/XAMPP/xamppfiles/var/mysql/mysql.sock', */
  58.             'host'      => env('DB_HOST', 'localhost'),
  59.             'database'  => env('DB_DATABASE', 'forge'),
  60.             'username'  => env('DB_USERNAME', 'forge'),
  61.             'password'  => env('DB_PASSWORD', ''),
  62.             'charset'   => 'utf8',
  63.             'collation' => 'utf8_unicode_ci',
  64.             'prefix'    => '',
  65.             'strict'    => false,
  66.             'engine'    => null,
  67.         ],
  68.  
  69.         'pgsql' => [
  70.             'driver'   => 'pgsql',
  71.             'host'     => env('DB_HOST', 'localhost'),
  72.             'database' => env('DB_DATABASE', 'forge'),
  73.             'username' => env('DB_USERNAME', 'forge'),
  74.             'password' => env('DB_PASSWORD', ''),
  75.             'charset'  => 'utf8',
  76.             'prefix'   => '',
  77.             'schema'   => 'public',
  78.         ],
  79.  
  80.         'sqlsrv' => [
  81.             'driver'   => 'sqlsrv',
  82.             'host'     => env('DB_HOST', 'localhost'),
  83.             'database' => env('DB_DATABASE', 'forge'),
  84.             'username' => env('DB_USERNAME', 'forge'),
  85.             'password' => env('DB_PASSWORD', ''),
  86.             'charset'  => 'utf8',
  87.             'prefix'   => '',
  88.         ],
  89.  
  90.     ],
  91.  
  92.     /*
  93.     |--------------------------------------------------------------------------
  94.     | Migration Repository Table
  95.     |--------------------------------------------------------------------------
  96.     |
  97.     | This table keeps track of all the migrations that have already run for
  98.     | your application. Using this information, we can determine which of
  99.     | the migrations on disk haven't actually been run in the database.
  100.     |
  101.     */
  102.  
  103.     'migrations' => 'migrations',
  104.  
  105.     /*
  106.     |--------------------------------------------------------------------------
  107.     | Redis Databases
  108.     |--------------------------------------------------------------------------
  109.     |
  110.     | Redis is an open source, fast, and advanced key-value store that also
  111.     | provides a richer set of commands than a typical key-value systems
  112.     | such as APC or Memcached. Laravel makes it easy to dig right in.
  113.     |
  114.     */
  115.  
  116.     'redis' => [
  117.  
  118.         'cluster' => false,
  119.  
  120.         'default' => [
  121.             'host'     => env('REDIS_HOST', 'localhost'),
  122.             'password' => env('REDIS_PASSWORD', null),
  123.             'port'     => env('REDIS_PORT', 6379),
  124.             'database' => 0,
  125.         ],
  126.  
  127.     ],
  128.  
  129. ];

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}





All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at