public function showFile($path)
    {
        // We need to clean the output buffer before showing the file
        ob_end_clean();
        ob_start();

        $type = \File::mimeType($path);

        return response()->file($path, ['Content-Type' => $type]);
    }
public function showFile($path)
    {
        // We need to clean the output buffer before showing the file
        ob_end_clean();
        ob_start();

        $type = \File::mimeType($path);

        return response()->file($path, ['Content-Type' => $type]);
    }
public function showFile ( $ path ) { // We need to clean the output buffer before showing the file ob_end_clean ( ) ; ob_start ( ) ; $ type = \ File :: mimeType ( $ path ) ; return response ( ) -> file ( $ path , [ 'Content-Type' => $ type ] ) ; }
Show the specified file in the browser.

@author Jonas Schwartz <josc@nodes.dk>
@param string $path
@return mixed
Show the specified file in the browser .