KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

Dashboard folder structure #2769

Closed GHSix opened this topic on on Jul 28, 2022 - 1 comments

GHSix commented on Jul 28, 2022

Following the siple examples in the Dashboard docs, I ended up with the followinf file structure:

- Dashboard
|- index.php
|- App.php
|- MyBorad.php
|- MyTable.php

I would like to change it to:

- Dashboard
|- index.php
|- App.php
|- My
||- MyBorad.php
||- MyTable.php

Then in App.log, I try to load MyBoard as:

protected function dashboards() {
        return [
            'TestBoard' => My\MyBoard::create()
        ];
    }

but it did not work.

What am I missing to be able to separate boards into folders?

KoolReport commented on Aug 1, 2022

Make sure that MyBoard has namespace My;

namespace My;

class MyBorad extends Dashboard
{
...
}

Dashboard Framework finds the php file location by using its full class name (including namespace).

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
help needed

Dashboard