質問編集履歴
2
database.phpの内容追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -112,8 +112,166 @@
|
|
112
112
|
|
113
113
|
|
114
114
|
|
115
|
-
### 【参考】
|
115
|
+
### 【参考】database.phpの内容
|
116
|
+
|
117
|
+
|
118
|
+
|
116
|
-
|
119
|
+
```
|
120
|
+
|
117
|
-
|
121
|
+
return [
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
|
118
|
-
|
127
|
+
'default' => env('DB_CONNECTION', 'mysql'),
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
'connections' => [
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
'sqlite' => [
|
140
|
+
|
141
|
+
*省略*
|
142
|
+
|
143
|
+
],
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
'mysql' => [
|
148
|
+
|
149
|
+
'driver' => 'mysql',
|
150
|
+
|
151
|
+
'url' => env('DATABASE_URL'),
|
152
|
+
|
153
|
+
'host' => env('DB_HOST', '127.0.0.1'),
|
154
|
+
|
155
|
+
'port' => env('DB_PORT', '3306'),
|
156
|
+
|
157
|
+
'database' => env('DB_DATABASE', '[DB名]'),
|
158
|
+
|
159
|
+
'username' => env('DB_USERNAME', '[DBユーザー名]'),
|
160
|
+
|
161
|
+
'password' => env('DB_PASSWORD', '[DBパスワード]'),
|
162
|
+
|
163
|
+
'unix_socket' => env('DB_SOCKET', '/Applications/MAMP/tmp/mysql/mysql.sock'),
|
164
|
+
|
119
|
-
|
165
|
+
'charset' => 'utf8',
|
166
|
+
|
167
|
+
'collation' => 'utf8_unicode_ci',
|
168
|
+
|
169
|
+
'prefix' => '',
|
170
|
+
|
171
|
+
'prefix_indexes' => true,
|
172
|
+
|
173
|
+
'strict' => true,
|
174
|
+
|
175
|
+
'engine' => null,
|
176
|
+
|
177
|
+
// 'unix_socket' => '/tmp/mysql.sock',
|
178
|
+
|
179
|
+
'options' => extension_loaded('pdo_mysql') ? array_filter([
|
180
|
+
|
181
|
+
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
|
182
|
+
|
183
|
+
]) : [],
|
184
|
+
|
185
|
+
],
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
'pgsql' => [
|
190
|
+
|
191
|
+
*省略*
|
192
|
+
|
193
|
+
],
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
'sqlsrv' => [
|
198
|
+
|
199
|
+
*省略*
|
200
|
+
|
201
|
+
],
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
],
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
'migrations' => 'migrations',
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
'redis' => [
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
'client' => env('REDIS_CLIENT', 'predis'),
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
'options' => [
|
230
|
+
|
231
|
+
'cluster' => env('REDIS_CLUSTER', 'predis'),
|
232
|
+
|
233
|
+
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
|
234
|
+
|
235
|
+
],
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
'default' => [
|
240
|
+
|
241
|
+
'url' => env('REDIS_URL'),
|
242
|
+
|
243
|
+
'host' => env('REDIS_HOST', '127.0.0.1'),
|
244
|
+
|
245
|
+
'password' => env('REDIS_PASSWORD', null),
|
246
|
+
|
247
|
+
'port' => env('REDIS_PORT', 6379),
|
248
|
+
|
249
|
+
'database' => env('REDIS_DB', 0),
|
250
|
+
|
251
|
+
],
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
'cache' => [
|
256
|
+
|
257
|
+
'url' => env('REDIS_URL'),
|
258
|
+
|
259
|
+
'host' => env('REDIS_HOST', '127.0.0.1'),
|
260
|
+
|
261
|
+
'password' => env('REDIS_PASSWORD', null),
|
262
|
+
|
263
|
+
'port' => env('REDIS_PORT', 6379),
|
264
|
+
|
265
|
+
'database' => env('REDIS_CACHE_DB', 1),
|
266
|
+
|
267
|
+
],
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
],
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
];
|
276
|
+
|
277
|
+
```
|
1
herokuダッシュボード画面キャプチャ添付
test
CHANGED
File without changes
|
test
CHANGED
@@ -109,3 +109,11 @@
|
|
109
109
|
laravel 5.8.37
|
110
110
|
|
111
111
|
PHP 7.3.9
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
### 【参考】mysqlダッシュボード画面のキャプチャ
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
![イメージ説明](286d61ad43f49b27ad95817b1527504f.png)
|