ユーザ用ツール

サイト用ツール


サイドバー



最近の更新



Tag Cloud

タグ#
6
10
1
3
1
2
17
7
1
1
6
9
4
1
2
178
1
4
2
7
12
5
1
25
2
3
1
6
1
1
31
1
3
3
1
1
1
1
1
1
13
45
7
9
10
5
10
3
2
2
8
2
2
6
3
1
1
4
7
4
2
2
2
1
7
2
4
1
2
21
2
12
2
3
1
1
2
2
1
1
1
3
2
2
4
2
2
1
1
2
1
1
1
2
1
26
2
1
2
2
2
1
1
2
3
12
4
7
1
1
2
9
1
3
1
1
7
1
1
1
1
1
8
1
4
1
2
1
1
1
3
3
4
1
2
1
1
7
3
1
3
1
1
4
1
2
1
2
6
2
1
3
1
1
3
1
2
1
2
2
2
1
2
3
1
1
3
2
1
3
1
1
3
2
1
1
7
1
3
3
1
1
1
1
5
1
24
2
1
2
1
2
2
3
1
1
1
2
1
2
1
1
1
1
1
1
1
2

11_php:02_framework:01_laravel:37_laravel_config

37 Laravel Config ge

config/*以下のconfigファイルをconfig()で呼び出す事ができます。

>>> config('session')
=> [
     "driver" => "memcached",
     "lifetime" => "1440",
     "expire_on_close" => true,
     "encrypt" => false,
     "files" => "/home/matsui/portal.kumolabo.com-dev2/storage/framework/sessions",
     "connection" => null,
     "table" => "sessions",
     "store" => null,
     "lottery" => [
       2,
       100,
     ],
     "cookie" => "laraveldev_session",
     "path" => "/",
     "domain" => null,
     "secure" => false,
     "http_only" => true,
     "same_site" => null,
   ]

定数を用意して利用

$ cat config/const.php 
<?php
return [
    'hogehoge' => [
        'name' => 'hoge',
        'status' => 1,
    ]
];
>>> config('const2')
=> [
     "hogehoge" => [
       "name" => "hoge",
       "status" => 1,
     ],
   ]

11_php/02_framework/01_laravel/37_laravel_config.txt · 最終更新: 2019/06/28 17:24 by matsui

Yesterday:120 Today:043 Total:00826