Level 75
@rffred It should be public static property
public static $module_name = "my-test";
Hi,
I have a custom module with variable
class MyTestProvider extends ServiceProvider
{
public protected $module_name = "my-test";
In this very same service provider, I have controllers. How can my controller access the $module_name variable??
I tried to add in my controller constructor
print \Test\MyTestProvider::module_name;
but that does not work. It is looking for a constant which my variable is not...
Not sure what to do...
@rffred It should be public static property
public static $module_name = "my-test";
Please or to participate in this conversation.