KoolReport's Forum

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

Laravel not displaying Pivot #441

Closed Dimitry opened this topic on on Aug 31, 2018 - 8 comments

Dimitry commented on Aug 31, 2018

Hi.

I am trying to work with Pivot package, but every time having pure regular table.

I believe that js is not loading. Should I move asset folder from Pivot package with css and js to public?

I am new to your framework, please help.

KoolReport commented on Aug 31, 2018

Hi Dimitry,

May I know your working environment? os, php version. Do you use any framework like Laravel or CodeIgiter?

Dimitry commented on Aug 31, 2018

I am using Laravel 5.6 with Docker, Nginx, Php-fpm 7.2, Postgresql on Centos 7.

Dimitry commented on Aug 31, 2018

This I have using provided example folder and customer_product_dollarsales2.csv as datasource.

KoolReport commented on Aug 31, 2018

I see, this table appear when report could not find it view. The report contain of 2 files: MyReport.php and MyReport.view.php. Also the MyReport.php should contain class called MyReport. If report could not find this view, it will show in debug mode as you see above which list all available datastore.

Also, since you are using Laravel, it is better you use Laravel friendship in the report, it will help you to configure to load resource of widget automatically:

class MyReport extends \koolreport\KoolReport
{
    use \koolreport\laravel\Friendship;
    ...
}

More information you may see Laravel package documentation.

Let me know if you need further assistance.

Dimitry commented on Aug 31, 2018

It works thanks :)

So for every report model i should make same name view in reports folder, and it will links automatically?

KoolReport commented on Aug 31, 2018

Yes it will link automatically. If you have different view you may put into the render($view) but without the params, report will look for the default view.

Dimitry commented on Aug 31, 2018

Thanks a lot :)

Dimitry commented on Aug 31, 2018

One more question.

MatrixPivot displaying well, but regular Pivot displaying without bootstrap (pure html).

Should I include some files in MyReport.view.php?

I added \koolreport\clients\Bootstrap and it works now;

Solved, thanks!

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
solved

Laravel