title: DomPDF from database record using laravel 4.2
body: <p>I am using laravel 4.2 barryvdh/laravel-dompdf.
  I want to have button for print my PDF.
  My routes:</p>
  
  <pre><code>Route::resource('orders', 'OrderController');
  </code></pre>
  
  <p>In OrderController I have method:</p>
  
  <pre><code>public function printpdf($id)
      {
          $order = Order::find($id);
  
          $pdf = PDF::loadView('print.en', $order);
          return $pdf-&gt;download($order-&gt;id .' '. $order-&gt;created_at);
      }
  </code></pre>
  
  <p>I can to call that method from my <code>show.blade.php</code>. I am using this link:</p>
  
  <p><code>&lt;a class="btn btn-small btn-danger" href="{{URL::to('orders/' . $order-&gt;id . '/printpdf')}}"&gt;Print PDF&lt;/a&gt;</code></p>
  
  <p>What route I must have to make this work? I want to make a function which takes a record from my MySQL database and prints it as PDF. How to use this correctly?</p>