Product Setup Module

Brand Management

Brand Management lets you create, update, activate/deactivate, and remove product brands used across product setup and product forms.

How It Works

  1. User opens the Brands page and gets a paginated list with search, sort, and status filter.
  2. User can add a new brand with title, optional image, and status.
  3. On edit, title/status/image can be changed. If image is replaced, old image is removed.
  4. Single or bulk status changes can set brands Active/Inactive.
  5. Single or bulk delete removes brands and related stored brand images.

Backend Files

  • app/Http/Controllers/Api/BrandController.php
  • app/Services/Api/BrandService.php
  • app/Http/Requests/Api/Brand/*
  • frontend-source/src/pages/product-setup/brand/Brands.jsx

API Endpoints

MethodEndpointPurpose
GET/api/v1/brandsList brands with pagination/filtering
POST/api/v1/brand/storeCreate a brand
ANY/api/v1/brand/update/{id}Update brand
ANY/api/v1/brand/update-status/{id}Update single status
POST/api/v1/brand/status-update/multipleBulk status update
DELETE/api/v1/brand/delete/{id}Delete single brand
DELETE/api/v1/brand/multiple-deleteDelete multiple brands

Validation and Rules

  • title: required, max 255, unique (company scoped)
  • image: optional image (png, jpg, jpeg, gif, webp)
  • status: optional; normalized to 1 or 0
  • ids (bulk): required array for bulk delete/status actions

Response Pattern

All operations follow a standard response shape with status, message, and optional data/meta/errors.

Integration Notes

  • Brands appear in Product create/edit forms as selectable options.
  • Brand data is used in product list filtering and reporting output.
  • Permission keys in UI include: brand.create, brand.edit, brand.delete.

Troubleshooting

IssueCauseFix
Brand create/update failsDuplicate title in same companyUse a unique brand title
Image upload rejectedUnsupported image formatUpload png/jpg/jpeg/gif/webp only
Bulk update/delete failsInvalid brand id in request listSend only existing brand IDs

Screenshots

Brand Management
Brand management screen