public function destroy($id) { $tipos = TipoSala::find($id); // Rol::destroy($id); $tipos->delete(); Session::flash('message', 'El tipo de sala ' . $tipos->nombre . ' fue eliminado'); return redirect()->route('Administrador.tiposSalas.index'); }
public function show($id) { $tipos = TipoSala::find($id); //dd($Campus); if ($tipos) { $data = array(array('Nombre', 'Descripcion'), array($tipos->nombre, $tipos->descripcion)); Excel::create('TipoSala' . $tipos->nombre, function ($excel) use($data) { $excel->sheet('Sheetname', function ($sheet) use($data) { $sheet->fromArray($data); }); })->download('csv'); } else { abort('404'); } }