2025-08-25 17:46:34 +09:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Http\Controllers\Api\V1;
|
|
|
|
|
|
2025-11-06 17:45:49 +09:00
|
|
|
use App\Helpers\ApiResponse;
|
2025-08-25 17:46:34 +09:00
|
|
|
use App\Http\Controllers\Controller;
|
|
|
|
|
use App\Services\CategoryLogService;
|
2025-11-06 17:45:49 +09:00
|
|
|
use Illuminate\Http\Request;
|
2025-08-25 17:46:34 +09:00
|
|
|
|
|
|
|
|
class CategoryLogController extends Controller
|
|
|
|
|
{
|
|
|
|
|
public function __construct(private CategoryLogService $service) {}
|
|
|
|
|
|
|
|
|
|
// GET /categories/{id}/logs
|
|
|
|
|
public function index(int $id, Request $request)
|
|
|
|
|
{
|
|
|
|
|
return ApiResponse::handle(function () use ($id, $request) {
|
|
|
|
|
return $this->service->index($id, $request->all());
|
|
|
|
|
}, '카테고리 변경이력 목록');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// GET /categories/logs/{log}
|
|
|
|
|
public function show(int $log)
|
|
|
|
|
{
|
|
|
|
|
return ApiResponse::handle(function () use ($log) {
|
|
|
|
|
return $this->service->show($log);
|
|
|
|
|
}, '카테고리 변경이력 조회');
|
|
|
|
|
}
|
|
|
|
|
}
|