Skip to main content
added 314 characters in body
Source Link
Tomi
  • 305
  • 1
  • 6

You did not initialise you helper properly. Instead using $successMessage = $this->helper->successMessage();

\Modzinc\Adminmonitor\Helper::successMessage();

Call this line in any place, it should call you helper successMessage function.

If you really want to use something like $this->helper. try add these code before you observer excute():

public function __construct(
        \Modzinc\Adminmonitor\Helper $helper
) {
     $this->helper = $helper;
}

Then you can just call $this->helper->successMessage();

You did not initialise you helper properly. Instead using $successMessage = $this->helper->successMessage();

\Modzinc\Adminmonitor\Helper::successMessage();

Call this line in any place, it should call you helper successMessage function.

You did not initialise you helper properly. Instead using $successMessage = $this->helper->successMessage();

\Modzinc\Adminmonitor\Helper::successMessage();

Call this line in any place, it should call you helper successMessage function.

If you really want to use something like $this->helper. try add these code before you observer excute():

public function __construct(
        \Modzinc\Adminmonitor\Helper $helper
) {
     $this->helper = $helper;
}

Then you can just call $this->helper->successMessage();

Source Link
Tomi
  • 305
  • 1
  • 6

You did not initialise you helper properly. Instead using $successMessage = $this->helper->successMessage();

\Modzinc\Adminmonitor\Helper::successMessage();

Call this line in any place, it should call you helper successMessage function.