About = $About; $this->helpers = $helpers; } public function index(Request $request){ $data = $request->all(); $validator = Validator::make($data, [ 'locale' => 'required|in:ru,en,tm', 'type' => 'required|in:about', ]); if($validator->fails()) { return $this->helpers->apiArrayResponseBuilder(400, 'fail', $validator->errors() ); } return response()->json(ContentResource::collection($this->About::where("type", $data['type'])->get())->response()->getData(), 200); } public static function getAfterFilters() {return [];} public static function getBeforeFilters() {return [];} public static function getMiddleware() {return [];} public function callAction($method, $parameters=false) { return call_user_func_array(array($this, $method), $parameters); } }