public function edit1($id = '') { $data = Document::find($id); $document = $data->converted_name; $fileNameSent = basename($document, ".pdf"); $path = asset('/uploads/compiled_html'); $htmlName = $path . '/' . $fileNameSent . '.html'; $obj = Objections::getObj(); $foo = Footer::getObj(); $fileData = file_get_contents($htmlName); return View::make('document.edit', array('file' => $fileData, 'id' => $id, 'docData' => $data, 'obj' => $obj, 'foo' => $foo)); }