LoginSignup
3
6

More than 5 years have passed since last update.

CakePHP3でDebugKitを非表示にする方法

Last updated at Posted at 2016-09-22

↓CakePHP3での開発においてデバッグに役立つDebugKit
DebugKit.jpg

ですが、本番環境でWebアプリを運用する際にはこの表示を消しておくべきでしょう。
config/bootstrap.php 内の下記の部分を修正することで消えます。

/*
 * Only try to load DebugKit in development mode
 * Debug Kit should not be installed on a production system
 */
if (Configure::read('debug')) {
    Plugin::load('DebugKit', ['bootstrap' => true]);
}

↓下記のように修正する。

/*
 * Only try to load DebugKit in development mode
 * Debug Kit should not be installed on a production system
 */
if (Configure::read('debug')) {
    /*本番環境ではfalseにしておく*/
    Plugin::load('DebugKit', ['bootstrap' => false]);
}

これで、画面上からDebugKitのアイコンが消えます。

3
6
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
6