In my view files, I use foreach loops and there is a huge function (this function is identical for all views) in these different foreach loops.
I want to write down this function into a library and I want to call this library and function from my different views.
I searched about this but I could not find anything.
Could you help me.
How can I call library and this function from my view files?