KoolReport's Forum

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

KoolReport works natively in Laravel and other PHP MVC frameworks #264

Open KoolReport opened this topic on on Apr 27, 2018 - 13 comments

KoolReport commented on Apr 27, 2018

Although KoolReport now can work with Laravel or other PHP MVC Frameworks without problem but we are planning to make special packages for each frameworks so that we can implement KoolReport seamlessly in those frameworks. For example KoolReport can use the default database settings in Laravel, utilize the eloquent of it.

Please let us know:

  1. Do you like this idea?
  2. If possible, please give us your comment of how do you want to use KoolReport inside those frameworks.

Thanks,

KoolPHP Inc

Robert commented on Apr 29, 2018

I like the idea.

David Willink commented on May 2, 2018

I like the idea. I vote for a package for the Fat Free Framework please.

KoolReport commented on May 3, 2018

@David Willink: Thank you! We will do that :)

David Willink commented on May 4, 2018

Thanks! Any tips you want to share as you go along would be great as I am trying to get started on this.

KoolReport commented on May 6, 2018

My tip: Just get started and no worry, it will not run at first try :D but it will, for sure. And you are backed by us, just post your question when you need help.

KoolReport commented on Jul 17, 2018

Just to update, we have release Laravel package and CodeIgniter package.

To make a report work inside Laravel, we just need to add a simple line like this into class of report

use \koolreport\laravel\Friendship;

To use KoolReport inside CodeIgniter, we do the same

use \koolreport\codeigniter\Friendship;

As a result of above line of code, your report now can access all databases from Laravel or Codeigniter and it will configure itself to publish required resources to public assets folder of two frameworks.

Those packages are the first pioneers in the campaign of making KoolReport work seamlessly in all PHP Frameworks or specific environments.

We always keep in mind KoolReport has to be easy, fast, flexible and extensible.

Thank you!

Tommy Hendrawan commented on Oct 8, 2018

Hi,

I try to use use \koolreport\laravel\Friendship; but got Trait 'koolreport\laravel\Friendship' not found Can you advice?

KoolReport commented on Oct 8, 2018

May be you have not download the Laravel package, please find it in the packages page, you just need to download, unzip and put it into packages folder.

Gibi commented on Oct 11, 2018

Hi!

I'm testing the Laravel package, but then i'm getting this error....

Undefined property: App\Reports\TimeChargeReport::$reportSettings in Friendship.php (line 14) at HandleExceptions->handleError(8, 'Undefined property: App\Reports\TimeChargeReport::$reportSettings',

Thanks in advance!

KoolReport commented on Oct 12, 2018

Do you test Laravel package with latest KoolReport 2.78.0

Wessel Verheijen commented on Mar 14, 2019

Hi, First of all I'm loving this framework. Even as a beginner PHP programmer I can get started quite quickly. In the topic post you suggest using Eloquent. How does this work? I've not found any documentation on this and my tests have not worked.

KoolReport commented on Mar 14, 2019

Thank you very much for your good words. About the eloquent, we get close to it, may be in next version of Laravel package.

KoolReport commented on Mar 15, 2019

Actually, you may utilize the ArrayDataSource like this:

In settings() function of report

protected function settings()
{
    return array(
        "dataSources"=>array(
            array(
                "eloquent"=>array(
                    "class"=>'\koolreport\datasources\ArrayDataSource'
                )
            )
        )
    );
}

and in the setup() function, you do:

protected function setup()
{
    $this->src("eloquent")->load(
        Flight::all()->toArray()
    )
    ->pipe(...)
}

Basically the we get results from Flight and turn them into associate array and utilize the ArrayDataSource to pipe data.

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
suggestion

None