added shortcut for registering controllers in the ioc container.
This commit is contained in:
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user