更新若干功能
This commit is contained in:
34
app/Http/Controllers/Api/FeedbackController.php
Normal file
34
app/Http/Controllers/Api/FeedbackController.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?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', '')),
|
||||
'已回复'
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user