laravel/framework — pull request #729 by Anahkiasen (2013-03-27 19:21:42+00:00)
Title: [Propsal] Add a way to bind global variables to the Application

Currently there is no real way to pass large chunks of data around in the Application. You can bind something to the global IoC by doing `App::bind('Something', $user)` (or `singleton` or all the other simlar methods).
But you will have problems as when comes the time to get it back the IoC container under Application will try to resolve whatever name you gave your global : it will either throw an Exception if it hasn't been set already, or try to resolve names that match classes (ie. "User") and return a new instance.

These three small methods allow you to set and set global variables around the application that may be too large for session.