<?php

namespace WpBookingEventFrontend\app\controllers;

use WpBookingEvent\Factory;
use WpBookingEvent\Filesystem\Support\StringController;
use WpBookingEvent\Mvc\Controller\ControllerFrontend;
use WpBookingEvent\Mvc\Model\Model;
use WpBookingEvent\Utilities\Utility;
use WpBookingEventFrontend\app\helpers\ConfigHelper as ConfigHelperAlias;
use WpBookingEventFrontend\app\helpers\EmailHelper;

defined('_WPBOOKINGEVENT_EXEC') or die;

/**
 * Class BlockController
 */
class ReviewController extends ControllerFrontend
{
    public function add_review()
    {
        $input = Factory::getInput();
        $data = $input->getData();
        $modelReview= Model::getInstance('review');
        $review = $modelReview->add_review($data);
        Utility::redirect(Utility::getFrontendGoToLink("service.detail", array("service_id" => $review->service_id)));
    }
    public function add_review_event()
    {
        $input = Factory::getInput();
        $data = $input->getData();
        $modelReview= Model::getInstance('review');
        $review = $modelReview->add_review_event($data);
        Utility::redirect(Utility::getFrontendGoToLink("event.detail", array("event_id" => $review->event_id)));
    }

}
