<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use PDF;
use App\Book;

class PDFController extends Controller
{
    public function getPDF(){
    	$books=Book::all();
    	$pdf=PDF::loadView('pdf.buku', ['books'=>$books]);
    	return $pdf->download('buku.pdf');
    }
}
