public function taskexcel($id) { Excel::create('Excel ', function ($excel) use($id) { $excel->sheet('new Sheet', function ($sheet) use($id) { $taskforms = TaskForm::where('task_id', $id)->with('device')->get(); $task = Task::with('company')->find($id); $sheet->setAllBorders('thin'); $sheet->setStyle(array('font' => array('name' => 'Calibri', 'size' => 10, 'bold' => false))); // Set border for cells $sheet->loadView('report.taskexcel')->with('taskforms', $taskforms)->with('task', $task); }); })->download('xls'); }
/** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit($id) { // $taskform = TaskForm::find($id); return view('taskforms.edit')->with('taskform', $taskform); }