<?php

namespace App\Http\Controllers\API;

use App\Http\Controllers\Controller;
use App\Http\Resources\BrandPaginationResource;
use App\Models\Brand;
use Illuminate\Http\Request;

class BrandController extends Controller
{
    public function index(Request $request)
    {
        $brands = Brand::query()->orderBy("position")->paginate($request->limit ?? 10);

        return (new BrandPaginationResource($brands))->response();
    }
}
