Viewmiddleware

ViewMiddleware renders the selected view file with the supplied data and wraps it in a layout. It resolves the file path based on the module and view name. If the view cannot be found it throws an exception. With debugging enabled it logs the path and variable names before returning the HTML.