Laravel 3 Snappy bundle Class Snappy not found -


i'm struggling snappy bundle work.

it keeps telling me snappy class not found.

i've installed bundle , added bundles.php file auto loading.

but still nothing.

all appreciated :) thanks

i found solution,

i had installed correctly issue should using namespaces. on bundle page says usage this.

bundle::start('snappy'); $snappy = snappy::make('/usr/bin/wkhtmltopdf'); header('content-type: application/pdf'); header('content-disposition: attachment; filename="file.pdf"'); echo $snappy->getoutput('http://laravel.com'); exit; 

the correct way use namespace so

bundle::start('snappy');  // following 2 lines added use knp\snappy\pdf;  $snappy = new pdf('/usr/local/bin/wkhtmltopdf');  header('content-type: application/pdf'); header('content-disposition: attachment; filename="file.pdf"'); echo $snappy->getoutput('http://laravel.com'); exit; 

Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

qt - Errors in generated MOC files for QT5 from cmake -