vandan
6 days ago

App\Http\Controllers\Spatie\PdfToImage\Pdf' not found

Posted 6 days ago by vandan

i try to convert pdf to image i use spatie/pdf-to-image package but when i excute then error Class 'App\Http\Controllers\Spatie\PdfToImage\Pdf' not found

here is my controller

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Input;
use Imagick;
use App\User;
use Image;
use PDF;

public function thumbGenerator(Request $request)
    { 
    $files=Input::file('image')->store('images');
    $pdf = new Spatie\PdfToImage\Pdf($files);
        $pdf->saveImage($pathToWhereImageShouldBeStored);

        $user = new User(array(
            'name'=>'abc',
                'email'=>'[email protected]',
                'password'=>bcrypt('123123'),
                'photo'=>$file,
        ));
        $user->save();
        return redirect()->back();
}

Please sign in or create an account to participate in this conversation.