Commit d50638cc authored by Taylor Otwell's avatar Taylor Otwell

added shortcut for registering controllers in the ioc container.

parent f182ae27
......@@ -70,6 +70,18 @@ class IoC {
static::$singletons[$name] = $instance;
}
/**
* Register a controller with the IoC container.
*
* @param string $name
* @param Closure $resolver
* @return void
*/
public static function controller($name, $resolver)
{
static::register("controller: {$name}", $resolver);
}
/**
* Resolve a core Laravel class from the container.
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment