public function setView($view, $variables = [])
    {
        if (!empty($variables)) {
            $this->with($variables);
        }

        $this->view = $view;
    }
public function setView($view, $variables = [])
    {
        if (!empty($variables)) {
            $this->with($variables);
        }

        $this->view = $view;
    }
public function setView ( $ view , $ variables = [ ] ) { if ( ! empty ( $ variables ) ) { $ this -> with ( $ variables ) ; } $ this -> view = $ view ; }
Set a view to render.

@param string $view
@param array  $variables
Set a view to render .