<?php

namespace App\Http\Controllers;

use app\Http\Traits\ApiResponse;
use App\Models\Category;
use Illuminate\Http\JsonResponse;

class CategoryController extends Controller
{
    use ApiResponse;

    public function list(): JsonResponse
    {
        $data = Category::all('category_id', 'category_name', 'subcategory_id', 'subcategory_name');

        return $this->successResponse($data);
    }
}
