vendredi 1 décembre 2017

Print the content of laravel blade (using Laravel 5.2)

I want to print the content of laravel blade file....file contains the html table of users...when user click on print button it must redirect to pop up window of print... Please help to resolve this issue.

Current code of reading the content of file...i don't know how to give the path of this file.....file is in resource/views/reports/table.blade.php

Current code shows me exception:

FileNotFoundException in Filesystem.php line 41: File does not exist at path printview_table

Code in Controller

public function printfile()
    {
        $filename = '/reports/printview_table.blade.php';
        try
        {
            $contents = File::get($filename);
            printfile($contents);  
        }
        catch (Illuminate\Filesystem\FileNotFoundException $exception)
        {
            die("The file doesn't exist");
        }
    }



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2AwlBui
via IFTTT

Aucun commentaire:

Enregistrer un commentaire