database.php 4.85 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
        'useragents' => [
            'driver' => 'sqlite',
Dominik Hebeler's avatar
Dominik Hebeler committed
56
            'database' => database_path(env('SQLITE_DATABASE', 'database.sqlite')),
57
58
            '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
            'charset' => 'utf8',
            'prefix' => '',
Dominik Hebeler's avatar
Dominik Hebeler committed
81
            'search_path' => 'public',
Dominik Hebeler's avatar
Dominik Hebeler committed
82
            '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
        'client' => env('REDIS_CLIENT', 'phpredis'),
114

Dominik Hebeler's avatar
Dominik Hebeler committed
115
        'options' => [
116
            'serializer' => Redis::SERIALIZER_IGBINARY,
Dominik Hebeler's avatar
Dominik Hebeler committed
117
            'compression' => Redis::COMPRESSION_ZSTD,
118
119
        ],

Dominik Hebeler's avatar
Dominik Hebeler committed
120
        'default' => [
Dominik Hebeler's avatar
Dominik Hebeler committed
121
122
123
124
125
            'read_write_timeout' => -1,
            'host' => env('REDIS_HOST', 'localhost'),
            'password' => env('REDIS_PASSWORD', null),
            'port' => env('REDIS_PORT', 6379),
            'database' => 0,
Dominik Hebeler's avatar
Dominik Hebeler committed
126
        ],
127
128
129
130
131
132
133

        'cache' => [
            'host' => env('REDIS_CACHE_HOST', 'localhost'),
            'password' => env('REDIS_CACHE_PASSWORD', null),
            'port' => env('REDIS_CACHE_PORT', 6379),
            'database' => 0,
        ],
134

Dominik Hebeler's avatar
Dominik Hebeler committed
135
        "clusters" => [
Dominik Hebeler's avatar
Dominik Hebeler committed
136
137
138
139
140
141
            'clustercache' => [
                [
                    'host' => env('REDIS_CACHE_HOST', 'localhost'),
                    'port' => env('REDIS_CACHE_PORT', 6379),
                ]
            ],
142
143
144
            'options' => [
                'password' => env('REDIS_CACHE_PASSWORD', null),
            ],
Dominik Hebeler's avatar
Dominik Hebeler committed
145
146
        ]

Dominik Hebeler's avatar
Dominik Hebeler committed
147

Dominik Hebeler's avatar
Dominik Hebeler committed
148
149
150
    ],

];