public function toggle($skill_id) { $skill = Skill::where('id', $skill_id)->select('id', 'current')->first(); $skill->current = !$skill->current; if ($skill->save()) { return Response::json($skill); } return Response::json(['message' => 'There was a problem updating the skill.'], 400); }