/** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { $model = Registro::findOrFail($id); try { Storage::delete($model->filename); } catch (Exception $e) { // The file was deleted on the server, someone should know about this... } $model->delete(); return redirect('registros')->with('message', 'Registro eliminado exitosamente!'); }