/** * Delete the given Level. * * @param int $id * @return Redirect */ public function getDelete($id = null) { $level = Level::destroy($id); // Redirect to the group management page return redirect('admin/levels')->with('success', Lang::get('message.success.delete')); }
/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy(Level $level) { if (Request::ajax()) { return Level::findOrFail($level->id) ? Level::destroy($level->id) : null; } else { } Level::findOrFail($level->id) ? Level::destroy($level->id) : null; flash('Level is deleted'); return redirect('levels'); }