Eloquent Coding

Posted 1 month ago by artisticre

I am trying to clean up my code with more eloquent coding. Can someone show me how to make the following code more eloquent?

   function applicationreportprint (Request $request)
                  {
                      $reportprint_id = $request->query('id');
                      $reportprint_data = DB::table('employmentapplication')

                      ->select(
                        'position',
                        'referred',
                        'Fname',
                        'Mname',
                        'Lname',
                        'socialsecurity',
                        'address',
                        'city',
                        'state',
                        'zipcode',
                        'email',
                        'phone',
                        'startdate',
                        'salary',
                        'uscitizen',
                        'workpapers',
                        'employmenttype',
                        'conviction',
                        'crimedescription',
                        'currentemployment',
                        'employmentyes',
                        'employmentno',
                        'sundaytime',
                        'mondaytime',
                        'tuesdaytime',
                        'wednesdaytime',
                        'thursdaytime',
                        'fridaytime',
                        'saturdaytime',
                        'graves',
                        'yesobligations',
                        'noobligations',
                        'previousworked',
                        'yespreviousworked',
                        'datesemployed',
                        'datesemployedreasonforleaving',
                        'driverslicense',
                        'stateissued',

                        'highschoolname',
                        'highschooladdress',
                        'highschoolyearscompleted',
                        'highschoolgraduate',
                        'highschoolmajor',
                        'highschoolgpa',

                        'certifications',

                        'universityname',
                        'universityaddress',
                        'universityyearscompleted',
                        'universitygraduate',
                        'universitymajor',
                        'universitygpa',

                        'technicalname',
                        'technicaladdress',
                        'technicalyearscompleted',
                        'technicalgraduate',
                        'technicalmajor',
                        'technicalgpa',

                        'reference1name',
                        'reference1phone',
                        'reference1yearsknown',
                        'reference1address',
                        'reference1city',
                        'reference1state',
                        'reference1zipcode',

                        'reference2name',
                        'reference2phone',
                        'reference2yearsknown',
                        'reference2address',
                        'reference2city',
                        'reference2state',
                        'reference2zipcode',

                        'reference3name',
                        'reference3phone',
                        'reference3yearsknown',
                        'reference3address',
                        'reference3city',
                        'reference3state',
                        'reference3zipcode',

                        'employment1startdate',
                        'employment1enddate',
                        'employment1companyname',
                        'employment1startsalary',
                        'employment1endsalary',
                        'employment1reasonleave',
                        'employment1contact',
                        'employment1positionsheld',
                        'employment1companyaddress',
                        'employment1phone',
                        'employment1supervisor',
                        'employment1description',

                        'employment2startdate',
                        'employment2enddate',
                        'employment2companyname',
                        'employment2startsalary',
                        'employment2endsalary',
                        'employment2reasonleave',
                        'employment2contact',
                        'employment2positionsheld',
                        'employment2companyaddress',
                        'employment2phone',
                        'employment2supervisor',
                        'employment2description',

                        'employment3startdate',
                        'employment3enddate',
                        'employment3companyname',
                        'employment3startsalary',
                        'employment3endsalary',
                        'employment3reasonleave',
                        'employment3contact',
                        'employment3positionsheld',
                        'employment3companyaddress',
                        'employment3phone',
                        'employment3supervisor',
                        'employment3description',

                        'applicantsignature',
                        'datesigned')
                        ->where('employmentapplication.id', '=', $reportprint_id)
                        ->first();
                      return view('application/applicationreportprint')->with(compact('reportprint_data'));

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

Reply to

Use Markdown with GitHub-flavored code blocks.