I have an admins array as a variable which is now declared in ViewComposer. However, now I want to use the same variable in middlewares too. Where is the best way to place a variable so I can share it through other files?
What I mean by ViewComposers:
$admins = ['hello@example.com'];
Where should I define it so that I can access it both in Middleware and ViewComposer? Or maybe completely globally through the app?
(If it was a string, I'd use .env
but it doesn't accept arrays)