Commit a150a7d4 authored by Taylor Otwell's avatar Taylor Otwell

allow multiple views to be registered for a single composer.

parent d1428948
...@@ -250,13 +250,18 @@ class View implements ArrayAccess { ...@@ -250,13 +250,18 @@ class View implements ArrayAccess {
* }); * });
* </code> * </code>
* *
* @param string $view * @param string|array $view
* @param Closure $composer * @param Closure $composer
* @return void * @return void
*/ */
public static function composer($view, $composer) public static function composer($views, $composer)
{ {
Event::listen("laravel.composing: {$view}", $composer); $views = (array) $views;
foreach ($views as $view)
{
Event::listen("laravel.composing: {$view}", $composer);
}
} }
/** /**
......
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