what is the mistake in this code? It gives an error:undefined filename :  //this is my form controller to insert details with image in database table
   public function store(Applicant $appl, ApplicantForm $request)
    {
    if($request->hasFile('ppimg_filename'))
         {
             $destinationPath="offerimages";
             $file = $request->file('ppimg_filename');
             $filename=$file->getClientOriginalName();
             $request->file('ppimg_filename')->move($destinationPath,$filename);

        }


        $a=$appl->create($request->all());
        
        $a['ppimg_filename'] = $filename;
        return 'done';
     

    }