public function view(string $path, array $data = [], bool $return = false)
  {
    if ($this->headers !== ['Content-Type: application/json']) {
      foreach($this->headers as $header) {
        header($header);
      }
    }

    return View::make($path, $data, $return);
  }
public function view(string $path, array $data = [], bool $return = false)
  {
    if ($this->headers !== ['Content-Type: application/json']) {
      foreach($this->headers as $header) {
        header($header);
      }
    }

    return View::make($path, $data, $return);
  }
public function view ( string $ path , array $ data = [ ] , bool $ return = false ) { if ( $ this -> headers !== [ 'Content-Type: application/json' ] ) { foreach ( $ this -> headers as $ header ) { header ( $ header ) ; } } return View :: make ( $ path , $ data , $ return ) ; }
Return a view response

@param string $path
@param array $data
@param bool $return
@return mixed
Return a view response