KoolReport's Forum

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

Laravel Error #1393

Closed Eugene opened this topic on on Apr 19, 2020 - 5 comments

Eugene commented on Apr 19, 2020

I tried to use koolreport in my Laravel project and got the following error

mkdir(): No such file or directory

Eugene commented on Apr 19, 2020

resolved by adding a public folder (I don't know why but I did not have this folder in my installation)

but there is a new problem

Datasource not found

In my setup function I use $this->src("myDBName") myDBName is the same name that i set in .env file for DB_DATABASE field.... What am I doing wrong?

Friendship is also set:

<?php
namespace App\Reports;

class fullPayrollReport extends \koolreport\KoolReport
{
    use \koolreport\laravel\Friendship;
    function setup()
    {
     
        $this->src("myDBName")
            ->query("SELECT user_name FROM user")
            ->pipe($this->dataStore("user"));
    }
}
KoolReport commented on Apr 19, 2020

Please try

$this->src("default")

to see how. Please let me know if it works.

Eugene commented on Apr 19, 2020

Resolved also using the solution from here

I think your documentation about Laravel package is not detailed enough/ Please add that

  • koolreport folder must be located in the vendor folder
  • compser.json must have the following lines
 "koolreport/core": "^4.5",
        "koolreport/laravel":"^2.0",

and update command must be run

  • Database name in 'src' it is the name from DB_CONNECTION

  • reports don't work without public folder in the root of the project

KoolReport commented on Apr 19, 2020

That's great suggestion. Thank you very much, Eugene!

Eugene commented on Apr 19, 2020

By the way.... could you give an example of how to send parameters to the report in Laravel case?

I meant if I have a date picker in my blade view how to send the value to the report and how is better to create parameters field - using koolreport controls or via Laravel?

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

Laravel