hi guys, im trying to use barryvdh/laravel-dompdf, everything works fine except i cant load my data to the view to dynamically produce content, i keep getting 'Undefined variable: data'

here is my code:

```
  $data =[
    'fname'=>Input::get('efname'),
    'lname'=>Input::get('elname'),
    'dob'=>Input::get('edob'),
    'reg_date'=>date('Y-m-d'),
    'email'=>Input::get('eemailaddrs'),
    'gender'=>Input::get('gender'),
    'mobile'=>Input::get('emobile'),
    'p_addrss'=>Input::get('epaddress'),
    'c_addrss'=>Input::get('ecaddress'),
    'quals'=>Input::get('quali'),
    'pdfname'=>$pdfname,
    'empId'=>Input::get('employeeId'),
    ];
return PDF::loadView('employee/generatepdf',$data)
        ->save(public_path().'/pdfs/'.$pdfname.'.pdf');

```

its going to pdf template page..But cant get the array values.

```
<!DOCTYPE html>
<html>
<head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
</head>
<body>
<img align="center" src="{{public_path()}}/assets/img/logo.png">
<table align="center" style="width:100%;margin-top:25px;">
<tr>
    <td style="width:50%">Registration ID</td>
    <td style="width:50%">:{{$data['empId']}}</td>
</tr>
<tr>
    <td style="width:50%">Name</td>
    <td style="width:50%">:{{$data['fname']}} {{$data['lname']}}</td>
</tr>
</table>
</body>
</html>

```

also not taking css rules into pdf file. 

How can i solve this issue...?

Thanks