query('power'); $application = $request->query('application'); $platform = $request->query('platform'); $solutions = Solution::published() ->when($power, fn ($q) => $q->where('power_segment', $power)) ->when($application, fn ($q) => $q->where('application', $application)) ->when($platform, fn ($q) => $q->where('chip_platform', $platform)) ->get(); return view('solutions.index', compact('solutions', 'power', 'application', 'platform')); } public function show(Solution $solution): View { if ($solution->status !== 'published') { abort(404); } return view('solutions.show', compact('solution')); } }