laravel - why A non-numeric value encountered? -


i trying download pdf file in laravel 5.4 application using dompdf. here controller code:

public function htmltopdfview($master_id){      $ordermaster=db::table('allorder')->where([['user_id',auth::user()->id],['id',$master_id]])->first();     $orderdetails=db::table('allorder_details')->where('master_id',$master_id)->get();     $pdf = pdf::loadview('orderreport',compact('ordermaster','orderdetails'));     return $pdf->download('invoice.pdf');     return view('orderreport',compact('ordermaster','orderdetails')); } 

and view blade file code:

@foreach($orderdetails $details)     <tr>         <td class="col-md-9"><em>{{$details->product}}</em></td>         <td class="col-md-1" style="text-align: center">{{$details->product_price}} tk </td>         <td class="col-md-1" style="text-align: center">${{$details->product_price/80}}  </td>         <td class="col-md-1 text-center">{{$details->barnd}}</td>     </tr> @endforeach  <div>     <h1 style="text-align:center;">         thank order.         <a href="{{route('pdfdownload',$ordermaster->id)}}">download pdf</a>     </h1> </div>        

here route:

    route::get('htmltopdfview/{id}','checkoutcontroller@htmltopdfview')->name('pdfdownload'); 

error screenshot : got error non-numeric value encountered

please me on this.thanks in advance

just in case recommend make sure dompdf latest version. block.php has 287 lines in latest version , error happens on line 741.

otherwise html not valid , table rows have no table. dompdf sensitive invalid html code.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -