I have a controller named expense. I want a global variable names total_expense which will be used throughout my app. I also need two other variables e.g john_expense and mark_expense.
I would like to access these two variables from the view of expense controller and the total_expense one in all views.
What is the best way to declare these variables and how do I access them from the view? How about creating methods which can be used from view that uses these variables?