I've used the following library in my Yii2 project: Click here
I've set it up and tested it and it works great. But now I want to make it dynamic as in if an admin clicks on a toggle switch the website should go into maintenance mode. To make it happen all I need to do is to make the enabled variable true which is used in Maintenance class of this library.
But my question is how can I link my toggle switch to that variable.
Thanks in advance!
You can access to application's components like below:
So, with this component you can access it like below: