Custom panel for debug extension

The Yii2-debug extension is a powerful tool for debugging own code, analyzing request information or database queries, and so on. Therefore, you can add your own panel for any custom report.

Getting ready

Create a new yii2-app-basic application by using the Composer package manager as described in the official guide at

How to do it...

  1. Create the panels directory on the root path of your site.
  2. Add a new UserPanel class:
    <?php namespace app\panels; use yii\debug\Panel; use Yii; class UserPanel extends Panel { public function getName() { return 'User'; } public function getSummary() { return Yii::$app->view->render('@app/panels/views/summary', ['panel' => ...

Get Yii2 Application Development Cookbook - Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.