public function bind($js)
    {
        foreach ($this->views as $view) {
            $this->event->listen("composing: {$view}", function () use ($js) {
                echo "<script>{$js}</script>";
            });
        }
    }
public function bind($js)
    {
        foreach ($this->views as $view) {
            $this->event->listen("composing: {$view}", function () use ($js) {
                echo "<script>{$js}</script>";
            });
        }
    }
public function bind ( $ js ) { foreach ( $ this -> views as $ view ) { $ this -> event -> listen ( "composing: {$view}" , function ( ) use ( $ js ) { echo "<script>{$js}</script>" ; } ) ; } }
Bind the given JavaScript to the view.

@param string $js
Bind the given JavaScript to the view .