What is the best way to do page breaks in dompdf?
I have had a look here at the page-break-before css attribute, but it didn\'t work when I did:
table {p
//Firstly assign a variable before starting for loop and set post-increment operator inside for loop. secondly, use with condition of data display item in a single page.
@foreach ($purchases as $key=> $purchase)
{{ $key + 1 }}
{{ $purchase->supplier->company_name ?
$purchase->supplier->company_name : "" }}
{{ "S-".$purchase->id }}
{{ salte_items($purchase->purchaseItems) }}
{{ $purchase->created_at->format('d-m-Y') }}
{{ intval($purchase->total) }}
@if ( $n % 25 == 0 )
@endif
@endforeach