public function post_question($user_id, $cat_id, $question_content) { $question = new Questions(); $question->user_id = $user_id; $question->cat_id = $cat_id; $question->content = $question_content; if ($question->save()) { return $question->toArray(); } return FALSE; }