database.php 4.04 KB
Newer Older
Dominik Hebeler's avatar
Dominik Hebeler committed
1 2 3 4 5 6 7 8 9 10 11 12 13
<?php

return [

    /*
    |--------------------------------------------------------------------------
    | PDO Fetch Style
    |--------------------------------------------------------------------------
    |
    | By default, database results will be returned as instances of the PHP
    | stdClass object; however, you may desire to retrieve records in an
    | array format for simplicity. Here you can tweak the fetch style.
    |
14
     */
Dominik Hebeler's avatar
Dominik Hebeler committed
15

Dominik Hebeler's avatar
Dominik Hebeler committed
16
    'fetch' => PDO::FETCH_OBJ,
Dominik Hebeler's avatar
Dominik Hebeler committed
17 18 19 20 21 22 23 24 25 26

    /*
    |--------------------------------------------------------------------------
    | Default Database Connection Name
    |--------------------------------------------------------------------------
    |
    | Here you may specify which of the database connections below you wish
    | to use as your default connection for all database work. Of course
    | you may use many connections at once using the Database library.
    |
27
     */
Dominik Hebeler's avatar
Dominik Hebeler committed
28

29
    'default' => env('DB_CONNECTION', 'sqlite'),
Dominik Hebeler's avatar
Dominik Hebeler committed
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44

    /*
    |--------------------------------------------------------------------------
    | Database Connections
    |--------------------------------------------------------------------------
    |
    | Here are each of the database connections setup for your application.
    | Of course, examples of configuring each database platform that is
    | supported by Laravel is shown below to make development simple.
    |
    |
    | All database work in Laravel is done through the PHP PDO facilities
    | so make sure you have the driver for your particular database of
    | choice installed on your machine before you begin development.
    |
45
     */
Dominik Hebeler's avatar
Dominik Hebeler committed
46 47 48 49

    'connections' => [

        'sqlite' => [
Dominik Hebeler's avatar
Dominik Hebeler committed
50
            'driver' => 'sqlite',
51
            'database' => database_path(env('SQLITE_DATABASE', 'database.sqlite')),
Dominik Hebeler's avatar
Dominik Hebeler committed
52
            'prefix' => '',
Dominik Hebeler's avatar
Dominik Hebeler committed
53
        ],
54 55 56 57 58
        'useragents' => [
            'driver' => 'sqlite',
            'database' => database_path('useragents.sqlite'),
            'prefix' => '',
        ],
Dominik Hebeler's avatar
Dominik Hebeler committed
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
        'mysql' => [
            'driver' => 'mysql',
            'host' => env('DB_HOST', 'localhost'),
            'port' => env('DB_PORT', '3306'),
            'database' => env('DB_DATABASE', 'forge'),
            'username' => env('DB_USERNAME', 'forge'),
            'password' => env('DB_PASSWORD', ''),
            'charset' => 'utf8',
            'collation' => 'utf8_unicode_ci',
            'prefix' => '',
            'strict' => true,
            'engine' => null,
        ],
        'pgsql' => [
            'driver' => 'pgsql',
            'host' => env('DB_HOST', 'localhost'),
            'port' => env('DB_PORT', '5432'),
Dominik Hebeler's avatar
Dominik Hebeler committed
76 77 78
            'database' => env('DB_DATABASE', 'forge'),
            'username' => env('DB_USERNAME', 'forge'),
            'password' => env('DB_PASSWORD', ''),
Dominik Hebeler's avatar
Dominik Hebeler committed
79 80 81 82
            'charset' => 'utf8',
            'prefix' => '',
            'schema' => 'public',
            'sslmode' => 'prefer',
Dominik Hebeler's avatar
Dominik Hebeler committed
83 84 85 86 87 88 89 90 91 92 93 94 95
        ],

    ],

    /*
    |--------------------------------------------------------------------------
    | Migration Repository Table
    |--------------------------------------------------------------------------
    |
    | This table keeps track of all the migrations that have already run for
    | your application. Using this information, we can determine which of
    | the migrations on disk haven't actually been run in the database.
    |
96
     */
Dominik Hebeler's avatar
Dominik Hebeler committed
97

Dominik Hebeler's avatar
Dominik Hebeler committed
98
    'migrations' => 'migrations',
Dominik Hebeler's avatar
Dominik Hebeler committed
99 100 101 102 103 104 105 106 107 108

    /*
    |--------------------------------------------------------------------------
    | Redis Databases
    |--------------------------------------------------------------------------
    |
    | Redis is an open source, fast, and advanced key-value store that also
    | provides a richer set of commands than a typical key-value systems
    | such as APC or Memcached. Laravel makes it easy to dig right in.
    |
109
     */
Dominik Hebeler's avatar
Dominik Hebeler committed
110

Dominik Hebeler's avatar
Dominik Hebeler committed
111
    'redis' => [
Dominik Hebeler's avatar
Dominik Hebeler committed
112

Dominik Hebeler's avatar
Dominik Hebeler committed
113
        'cluster' => false,
Dominik Hebeler's avatar
Dominik Hebeler committed
114

Dominik Hebeler's avatar
Dominik Hebeler committed
115 116
        'default' => [
            'host' => env('REDIS_HOST', 'localhost'),
117
            'password' => env('REDIS_PASSWORD', null),
Dominik Hebeler's avatar
Dominik Hebeler committed
118
            'port' => env('REDIS_PORT', 6379),
Dominik Hebeler's avatar
Dominik Hebeler committed
119 120 121 122 123
            'database' => 0,
        ],
    ],

];