<?php

namespace App\Http\Controllers\Prototype;

use Auth;
use Illuminate\Http\Request;

use App\Http\Controllers\Controller;
use Meneses\LaravelMpdf\Facades\LaravelMpdf;

class TestController extends Controller
{
    public function __construct()
    {
        // parent::__construct();
    }

    public function pdf(Request $request)
    {
        $data = [
            'foo' => '首页',
            'bar' => 'hello 2'
        ];
        $pdf = LaravelMpdf::loadView('pdfs.qr', $data);
        return $pdf->stream('qr.pdf');
    }
}