8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d142894 commit a150a7dCopy full SHA for a150a7d
laravel/view.php
@@ -250,13 +250,18 @@ public static function name($view, $name)
250
* });
251
* </code>
252
*
253
- * @param string $view
254
- * @param Closure $composer
+ * @param string|array $view
+ * @param Closure $composer
255
* @return void
256
*/
257
- public static function composer($view, $composer)
+ public static function composer($views, $composer)
258
{
259
- Event::listen("laravel.composing: {$view}", $composer);
+ $views = (array) $views;
260
+
261
+ foreach ($views as $view)
262
+ {
263
+ Event::listen("laravel.composing: {$view}", $composer);
264
+ }
265
}
266
267
/**
0 commit comments