Skip to content

Config enable tool

Bart van Hoekelen edited this page Apr 26, 2017 · 2 revisions

Tables of contents

Purpose

You can enable or disable the performance tool. There are two ways. Manual by with a boolean as variable or with the help of de Laravel ENV variable.

Code

// Add namespace at the top 
use Performance\Config;

// Disable tool manual
Config::setEnableTool(false);

// OR with the Laravel ENV file
// Disable tool by the ENV by using the APP_DEBUG value.
Config::setEnableTool('ENV:APP_DEBUG');
Config::setConsoleLive($status);
Item Type Accept Default Required
$status bool or string true, false or ENV: APP_DEBUG false yes

Exemple

Note: pay attention on the printed results.

Normal state

PHP performance tool - Config:: ENABLE_TOOL on true

With config item

PHP performance tool - Config:: ENABLE_TOOL on false