/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { $grade = Grade::find($id); if (!is_null($grade)) { $grade->delete(); return json_encode(true); } else { return json_encode(false); } }