Check out the View::share documentation. https://laravel.com/docs/8.x/views#sharing-data-with-all-views If that is not what you are looking for, then I would suggest, inside your controller, set a session variable like this.
Session::put('foo', 'bar')
Above foo is the name of the variable and bar is the value. Now, when I need to change the value of foo, for example in a blade file, I can do so like this.
{{Session::put('foo','Another Bar')}}
CLICK HERE to find out more related problems solutions.