3 use Illuminate\Support\Str;
8 |--------------------------------------------------------------------------
9 | Default Database Connection Name
10 |--------------------------------------------------------------------------
12 | Here you may specify which of the database connections below you wish
13 | to use as your default connection for all database work. Of course
14 | you may use many connections at once using the Database library.
18 'default' => env('DB_CONNECTION', 'mysql'),
21 |--------------------------------------------------------------------------
22 | Database Connections
23 |--------------------------------------------------------------------------
25 | Here are each of the database connections setup for your application.
26 | Of course, examples of configuring each database platform that is
27 | supported by Laravel is shown below to make development simple.
30 | All database work in Laravel is done through the PHP PDO facilities
31 | so make sure you have the driver for your particular database of
32 | choice installed on your machine before you begin development.
40 'url' => env('DATABASE_URL'),
41 'database' => env('DB_DATABASE', database_path('database.sqlite')),
43 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
48 'url' => env('DATABASE_URL'),
49 'host' => env('DB_HOST', '127.0.0.1'),
50 'port' => env('DB_PORT', '3306'),
51 'database' => env('DB_DATABASE', 'forge'),
52 'username' => env('DB_USERNAME', 'forge'),
53 'password' => env('DB_PASSWORD', ''),
54 'unix_socket' => env('DB_SOCKET', ''),
55 'charset' => 'utf8mb4',
56 'collation' => 'utf8mb4_unicode_ci',
58 'prefix_indexes' => true,
60 'timezone' => '+00:00',
62 'options' => extension_loaded('pdo_mysql') ? array_filter([
63 PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
69 'url' => env('DATABASE_URL'),
70 'host' => env('DB_HOST', '127.0.0.1'),
71 'port' => env('DB_PORT', '5432'),
72 'database' => env('DB_DATABASE', 'forge'),
73 'username' => env('DB_USERNAME', 'forge'),
74 'password' => env('DB_PASSWORD', ''),
77 'prefix_indexes' => true,
78 'search_path' => 'public',
79 'sslmode' => 'prefer',
84 'url' => env('DATABASE_URL'),
85 'host' => env('DB_HOST', 'localhost'),
86 'port' => env('DB_PORT', '1433'),
87 'database' => env('DB_DATABASE', 'forge'),
88 'username' => env('DB_USERNAME', 'forge'),
89 'password' => env('DB_PASSWORD', ''),
92 'prefix_indexes' => true,
98 |--------------------------------------------------------------------------
99 | Migration Repository Table
100 |--------------------------------------------------------------------------
102 | This table keeps track of all the migrations that have already run for
103 | your application. Using this information, we can determine which of
104 | the migrations on disk haven't actually been run in the database.
108 'migrations' => 'migrations',
111 |--------------------------------------------------------------------------
113 |--------------------------------------------------------------------------
115 | Redis is an open source, fast, and advanced key-value store that also
116 | provides a richer body of commands than a typical key-value system
117 | such as APC or Memcached. Laravel makes it easy to dig right in.
123 'client' => env('REDIS_CLIENT', 'phpredis'),
126 'cluster' => env('REDIS_CLUSTER', 'redis'),
127 'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
131 'url' => env('REDIS_URL'),
132 'host' => env('REDIS_HOST', '127.0.0.1'),
133 'password' => env('REDIS_PASSWORD'),
134 'port' => env('REDIS_PORT', '6379'),
135 'database' => env('REDIS_DB', '0'),
139 'url' => env('REDIS_URL'),
140 'host' => env('REDIS_HOST', '127.0.0.1'),
141 'password' => env('REDIS_PASSWORD'),
142 'port' => env('REDIS_PORT', '6379'),
143 'database' => env('REDIS_CACHE_DB', '1'),