Hello, I'm integrating koolreport with Laravel framework. I'm using eloquent to fetch data. I've created an eloquent accessors, but I can't use those fields. Can I use the same for reporting instead of raw queries? Like instead of using following approach
<?php
namespace App\Reports;
class MyReport extends \koolreport\KoolReport
{
use \koolreport\laravel\Friendship;
function setup()
{
$this->src("sale_database")
->query("SELECT * FROM offices")
->pipe($this->dataStore("offices"));
}
}
can I use something like this?
<?php
namespace App\Reports;
class MyReport extends \koolreport\KoolReport
{
use \koolreport\laravel\Friendship;
function setup()
{
$this->src("sale_database")
->query(Model::all())
->pipe($this->dataStore("offices"));
}
}