Open Mohamed-Elaraby opened 2 weeks ago
At the moment, you can override the method getDataForPrint
or the printPreview
.
public function printPreview(): Renderable
{
$data = $this->getDataForPrint();
return view($this->printPreview, compact('data'));
}
/**
* Get mapped columns versus final decorated output.
*/
protected function getDataForPrint(): array
{
$columns = $this->printColumns();
return $this->mapResponseToColumns($columns, 'printable');
}
Copy
resources/views/vendor/datatables/print.blade.php
content toresources/views/transactions/print.blade.php
and append any necessary info you wanted to print.Originally posted by @yajra in https://github.com/yajra/laravel-datatables/issues/759#issuecomment-248494798