Dear Team, I have implemented the following code in order to optimize the code. I have taken a min class and I have implemented the methods of all other class.
So now how should I call those multiple functions which have implemented in a single class.
<?php
use \koolreport\dashboard\metrics\Value;
use \koolreport\dashboard\fields\Date;
use \koolreport\dashboard\fields\Number;
class patient_main
{
//enquires.php
protected function dataSource()
{
return AutoMaker::table("tablename");
}
protected function fields()
{
return [
Date::create("custCreatedDate"),
$this->count(
Number::create("custEnquiryId")
)
];
}
//appointments.php
protected function dataSource()
{
return AutoMaker::table("tblconsultation");
}
protected function fields()
{
return [
Date::create("appointmentDate"),
$this->count(
Number::create("appointmentDate")
)
];
}
}