/** * Remove the specified resource from storage. * * @param int $id * @return json */ public function destroy($id) { $statusproject = StatusProject::find($id); if ($statusproject != null) { $statusproject->delete(); } return json_encode("success"); }