I am trying to use PhantomJs in my laravel 5 project. I downloaded through composer. I added the section "My suppliers" and the section "Aliases" in the config / app.php file
So now I created my controller as shown below:
<?php namespace App\Http\Controllers;
use App\Http\Requests;
use PDF;
use View;
class PdfController extends Controller {
public function index()
{
$view = View::make('home');
return PDF::createFromView($view, 'home.pdf');
}
}
I also created my route for this method. However, when I try to do this in my browser, it causes the following error:
PhantomJS: sh: / Users / matts / sites / ManagementApp / vendor / antking / phantom-pdf / src /../ bin / phantomjs: cannot execute binary
Has anyone come across this before?
thanks
source
share