allow multiple views to be registered for a single composer.
This commit is contained in:
parent
d1428948ea
commit
a150a7d457
|
@ -250,14 +250,19 @@ public static function name($view, $name)
|
|||
* });
|
||||
* </code>
|
||||
*
|
||||
* @param string $view
|
||||
* @param string|array $view
|
||||
* @param Closure $composer
|
||||
* @return void
|
||||
*/
|
||||
public static function composer($view, $composer)
|
||||
public static function composer($views, $composer)
|
||||
{
|
||||
$views = (array) $views;
|
||||
|
||||
foreach ($views as $view)
|
||||
{
|
||||
Event::listen("laravel.composing: {$view}", $composer);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the rendered contents of a partial from a loop.
|
||||
|
|
Loading…
Reference in New Issue