public function recruitment() { $HTMLControl = HTMLControl::findOrFail(2); $context = ['HTMLControl' => $HTMLControl]; return view('front.Recruitment', $context); }
public function pdf() { $strFileName = "HTMLControl" . '_' . date_format(\Carbon\Carbon::now(), 'Ymd'); \Excel::create($strFileName, function ($excel) { $excel->sheet("HTMLControl", function ($sheet) { $HTMLControls = $this->_searchQuery(HTMLControl::where('deleted_at', '=', null))->get(); $sheet->fromArray($HTMLControls); }); })->download('pdf'); }