As I have a method name statistics() in my defaultController and I have to use the same method in viewController is there any way to do so?
1 Answer
In viewController you can simply access your method like this:
public function actionDetails(){
$data = DefaultController::statistics();
return $data;
}
I hope this will help.
Thanks.