Cześć.
Chcę zlecić laravelowi drukowanie do PDF, ale przy dużcyh wydrukach otrzymuję komunikat
Strona strona.pl nie działa
Serwer miccom.pl nie może teraz obsłużyć tego żądania.
HTTP ERROR 500
Jak rozwiązać ten problem?
Proszę o pomoc.
public function drukujListe($id) { switch($id){ case 1: $data = Player::where('plec', '=', 1)->where('rok','=',Auth::user()->rok)->orderBy('nazwisko')->get(); $name ='Dziewcząt'; break; case 2: $data = Player::where('plec', '=', 2)->where('rok','=',Auth::user()->rok)->orderBy('nazwisko')->get(); $name ='Chłopców'; break; case 3: $data = Player::where('rok','=',Auth::user()->rok)->orderBy('nazwisko')->get(); $name ='Dziewcząt i chłopców'; break; } $formPrint = ' <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <style> *{ font-family: DejaVu Sans, font-size: 12px;} .footer { position: fixed; left: 0px; bottom: 0px; right: 0px; height: 50px; text-align:center; } td{padding-left:5px;} #printList{ margin:0 auto; width:400px; } #headerPrintList{ text-align:center; height:60px; } </style> <div id="printList"> <div id="headerPrintList"> Rocznik 2016<br> </div> <table border="1" style="width:100%; border-collapse: collapse;font-size:11px;"> <tr> <td colspan="3" style="text-align:center; font-weight:bold;"> LISTA '.$name.' </td> </tr> <tr style="background-color:lightgray"> <td style="width:10%">l.p</td> <td style="width:70%;"> NAZWISKO, Imię </td> <td style="width:20%;"> szkoła </td> </tr>'; $i = 1; foreach($data as $singleData ){ $formPrint .= '<tr> <td>'.$i.'</td> <td>'.$singleData->nazwisko.' '.$singleData->imie.'</td> <td> '.$this->pobierzSzkoleTXT($singleData->szkolaId).' </td> </tr>'; $i++; } $formPrint .= '</table> <p class="footer">LISTA 2016<br> </p> </div> '; //echo $formPrint; $pdf = PDF::loadHTML($formPrint)->setPaper('a4')->setOrientation('portrait')->setWarnings(true); return $pdf->download('lista'.$name.'.pdf'); }