Skip to content
Advertisement

Lumen : using helper get error : Using $this when not in object context

I have create this helper in Helpers folder inside Http folder:

JavaScript

when I call it in controller :

JavaScript

it give me this error : Using $this when not in object context where I remove $this in function I get this error : Call to undefined function AppHttpHelperscheck_id()

Advertisement

Answer

check_id is a static function if you want to access it into other function then you have to use…

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement