App\Http\Controllers\Forum\TopicsController::voteFeature PHP Method

voteFeature() public method

public voteFeature ( $topicId )
    public function voteFeature($topicId)
    {
        $star = FeatureVote::createNew(['user_id' => Auth::user()->user_id, 'topic_id' => $topicId]);
        if ($star->getKey() !== null) {
            return ujs_redirect(route('forum.topics.show', $topicId));
        } else {
            return error_popup(implode(' ', $star->validationErrors()->allMessages()));
        }
    }