public static function composer($views, $composer)
	{
		$views = (array) $views;

		foreach ($views as $view)
		{
			Event::listen("laravel.composing: {$view}", $composer);
		}
	}
public static function composer($views, $composer)
	{
		$views = (array) $views;

		foreach ($views as $view)
		{
			Event::listen("laravel.composing: {$view}", $composer);
		}
	}
public static function composer ( $ views , $ composer ) { $ views = ( array ) $ views ; foreach ( $ views as $ view ) { Event :: listen ( "laravel.composing: {$view}" , $ composer ) ; } }
Register a view composer with the Event class.

<code>
// Register a composer for the "home.index" view
View::composer('home.index', function($view)
{
$view['title'] = 'Home';
});
</code>

@param  string|array  $views
@param  Closure       $composer
@return void
Register a view composer with the Event class .