Closed ngsource closed 7 years ago
Were you able to install dompdf: ~6.2.0 or laravel-snappy package?
I'm having the same issue. I have these installed:
"barryvdh/laravel-snappy": "^0.3.1",
"dompdf/dompdf": "^0.7.0",
And under datatables-buttons.php I have this configuration:
'pdf_generator' => 'snappy',
I'm getting Forbidden on all exports, CSV, Excel and PDF.
Seems like the request is issued to wrong route, since I see that the URL in URL bar is:
http://website.dev/&draw=1&columns%5B0%5D%5Bdata%5D=name . . . &action=excel
...notice that request is sent to index page (instead of the resource) and that query part is malformed. All DataTables exporters redirect to this URL.
It used to work, I only noticed today that it doesn't.
UPDATE 1: Tried to downgrade dompdf to ~0.6.1 (according to docs), but that doesn't change anything.
SOLUTION: Copying (publishing) buttons.server-side.js from vendor folder to my assets folder (+ running gulp) solved the issue for me. Seems like we were using old buttons JS code...
@tad3j yeah, there was a bug on buttons-server-side.js and was fixed on the latest release. Thanks!
I have installed all the dependencies correctly. When I click on the export button I receive Forbidden - Error. Below is my code.
` namespace App\DataTables;
use App\User; use Yajra\Datatables\Services\DataTable;
class UserDataTable extends DataTable {
}
return $dataTable->render('app.clients.index');
{!! $dataTable->table() !!}