dimanche 9 juin 2019

laravel generates a blank pdf file

I am following this page on github and I have the following function in the controller but the output is a blank one-page pdf file:

public function generateCV(){

        $id = Auth::user()->applicant_id;
        $data["row"] = Applicant::find($id);
        $data["educations"] = $this->getSubRecords("app_educations",$id);
        $data["experiences"] = $this->getSubRecords("app_experiences",$id);
        $data["languages"] = $this->getSubRecords("app_languages",$id);
        $data["trainings"] = $this->getSubRecords("app_trainings",$id);

        $pdf = PDF::loadView('applicants.cv', $data);
        return $pdf->stream('cv.pdf');
}



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire