I’m currently converting a personal project I’ve been working on to Sage 9.
I have a couple classes that I initialize and then global their variables in each template that I need them in, but using Blade I feel that there’s a better way to accomplish it.
Using Google, I came across https://stackoverflow.com/questions/29715813/laravel-5-global-blade-view-variable-available-in-all-templates which would let me use my variable across all blade’s without manually globaling them, but I’m curious if there’s a way with the current implementation to do something like this? I understand what they are saying and have done it before inside of Laravel, but I’m unsure how to accomplish it with Sage 9’s use of Blade.
Any insight on this would be greatly appreciated as I’d like to make everything as clean as possible.