. */ declare(strict_types=1); namespace FireflyIII\Http\Controllers\Admin; use FireflyIII\Http\Controllers\Controller; /** * Class TelemetryController */ class TelemetryController extends Controller { /** * TelemetryController constructor. */ public function __construct() { if (false === config('firefly.feature_flags.telemetry')) { die('Telemetry is disabled.'); } parent::__construct(); $this->middleware( function ($request, $next) { app('view')->share('title', (string)trans('firefly.administration')); app('view')->share('mainTitleIcon', 'fa-hand-spock-o'); return $next($request); } ); } /** * Index */ public function index() { app('view')->share('subTitleIcon', 'fa-eye'); app('view')->share('subTitle', (string)trans('firefly.telemetry_admin_index')); $version = config('firefly.version'); $enabled = config('firefly.send_telemetry', false) && config('firefly.feature_flags.telemetry'); return prefixView('admin.telemetry.index', compact('version', 'enabled')); } }