/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { $datatype = DataType::find($id); $table_name = $datatype->name; if (DataType::destroy($id)) { return redirect('/admin/builder')->with(array('message' => 'Successfully removed BREAD from ' . $table_name, 'alert-class' => 'success', 'alert-icon' => 'trash-o')); } return redirect('/admin/builder')->with(array('message' => 'Sorry it appears there was a problem removing this bread', 'alert-class' => 'danger', 'alert-icon' => 'exclamation-triangle')); }