从主题文件夹加载视图

Hey i am working on laravel for the first time so my problem is this that I am using 2 packages ie

"barryvdh/laravel-dompdf": "0.4.*"
"teepluss/theme": "dev-master",

dompdf is to make a dynamic page into pdf and as I am using teepluss theme so all my view is in the themes folder

this is my controller method

public function previewform(){
    if(Auth::check())   {
         $pdf = App::make('dompdf');
         $pdf->loadView(('user.previewform'));
         return $pdf->stream();
    }else {
          return \Redirect::route('home');
    }
}

So when I am using $pdf->loadView('user.previewform') , it gives me a error because it will load the view from app/view folder . so how can change loadview directory so that I can see view from theme directory

Kindly read this answer. All you need is to set view environment.

  1. Add location for new directory
  2. Assign namespace
  3. Use it with namespace

I have not added detail as this question is already answered.