public function destroy(Bug $bug) { if (is_integer($bug)) { $bug = Bug::find($bug); } $bug->delete(); Flash::success('Bug has been created Deleted!'); return Redirect::back(); }
public function destroy($bug) { $bug = Bug::find($bug); $bug->delete(); return response(['data' => true, 'status' => 'success', 'message' => 'successfully deleted']); }