has('type') ? $request->input('type') : ''; if (empty($type)) { return response()->error("PARAM_EMPTY"); } $promotionHeadlinesResult = PromotionService::getAllHeadlines($type); return response()->collection(new HeadlinelTransformer(), $promotionHeadlinesResult); } }