0

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

PHP_USER1
  • 628
  • 1
  • 14
  • 29
  • possible duplicate of [How to load view from alternative directory in Laravel 4](http://stackoverflow.com/questions/18954758/how-to-load-view-from-alternative-directory-in-laravel-4) – hhsadiq Jul 27 '15 at 07:18

1 Answers1

1

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.

Community
  • 1
  • 1
hhsadiq
  • 2,871
  • 1
  • 25
  • 39