35 lines
739 B
PHP
35 lines
739 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Api;
|
|
|
|
use App\BaseApp\BaseController;
|
|
use App\Service\business\FeedbackService;
|
|
use Illuminate\Http\JsonResponse;
|
|
|
|
/**
|
|
* 后台用户反馈
|
|
*/
|
|
class FeedbackController extends BaseController
|
|
{
|
|
protected array $exceptRoute = ['option', 'create'];
|
|
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
$this->service = FeedbackService::getInstance();
|
|
$this->updateField = ['id', 'reply'];
|
|
}
|
|
|
|
/**
|
|
* 回复
|
|
* @Method POST
|
|
*/
|
|
public function reply(): JsonResponse
|
|
{
|
|
return jok(
|
|
$this->service->reply((int) request()->post('id', 0), (string) request()->post('reply', '')),
|
|
'已回复'
|
|
);
|
|
}
|
|
}
|