source/Application.php
protected function ensureResponse($output)
    {
        if ($output instanceof Response)
        {
            return $output;
        }
        elseif (is_string($output))
        {
            return Response::create($output, 200);
        }
        else
        {
            $message = "Action response cannot be served.";
            throw new ApplicationException($message);
        }
    }
protected function ensureResponse($output)
    {
        if ($output instanceof Response)
        {
            return $output;
        }
        elseif (is_string($output))
        {
            return Response::create($output, 200);
        }
        else
        {
            $message = "Action response cannot be served.";
            throw new ApplicationException($message);
        }
    }
protected function ensureResponse ( $ output ) { if ( $ output instanceof Response ) { return $ output ; } elseif ( is_string ( $ output ) ) { return Response :: create ( $ output , 200 ) ; } else { $ message = "Action response cannot be served." ; throw new ApplicationException ( $ message ) ; } }
Ensure output is a proper response object.

@param mixed $output

@throws ApplicationException
@return Response
Ensure output is a proper response object .