/** * Post controller for edit feedback * * @return array|bool|string */ public function editAction() { $data = PostRequest::post(); $response = array(); if (!isset($data->id)) { $response['error'] = self::ERROR_ID_IS_REQUIRED; return $response; } if (!isset($data->message)) { $response['error'] = self::ERROR_MESSAGE_IS_REQUIRED; return $response; } $response = Feedback::edit($data->id, $data->message); return $response; }
public function loginAction() { $request = new LoginRequest(PostRequest::post(), true); return User::login($request); }