1

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

In viewController you can simply access your method like this:

public function actionDetails(){        
    $data = DefaultController::statistics();            
    return $data;
}

I hope this will help.

Thanks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.