public function renderWithData($path, $data = [])
    {
        foreach ($data as $key => $value) {
            $this->add($key, $value);
        }

        $this->render($path);

        return $this;
    }
public function renderWithData($path, $data = [])
    {
        foreach ($data as $key => $value) {
            $this->add($key, $value);
        }

        $this->render($path);

        return $this;
    }
public function renderWithData ( $ path , $ data = [ ] ) { foreach ( $ data as $ key => $ value ) { $ this -> add ( $ key , $ value ) ; } $ this -> render ( $ path ) ; return $ this ; }
Renders a view with data to pass on to the view.

@param string $path - View's path
@param array  $data - The data to render with

@return \Scara\Http\Controller
Renders a view with data to pass on to the view .