I am getting below when I try to run my sample report page developed using Laravel.
Symfony\Component\ErrorHandler\Error\FatalError
main(): Failed opening required 'C:\xampp\htdocs\Mena\app\Reports/koolreport/core/autoload.php' (include_path='C:\xampp\php\PEAR')
find below my source files
// ------ Web php ------
Route::get('/report', "ReportController@index");
//------ ReportController.php ------
<?php
// ReportController.php
namespace App\Http\Controllers;
use App\Reports\MyReport;
class ReportController extends Controller
{
public function __contruct()
{
$this->middleware("guest");
}
public function index()
{
$report = new MyReport;
$report->run();
return view("report",["report"=>$report]);
}
}
MyReport.php
<?php
namespace App\Reports;
use \koolreport\laravel\Friendship;
require_once __DIR__."/koolreport/core/autoload.php";
class MyReport extends \koolreport\KoolReport
{
//We leave this blank to demo only
}
MyReport.view.php == Expected Output.
<html>
<head>
<title>My Report</title>
</head>
<body>
<h1>It works</h1>
</body>
</html>