Search by

itmosoft / laravel-vendors

adeelrao007

Vendor profiles, ownership, onboarding status, and moderation for Laravel marketplace applications.

Package info

github.com/ITMOSOFT/laravel-vendors

pkg:composer/itmosoft/laravel-vendors

Statistics

Installs: 3

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-11-14 15:53 UTC

This package is auto-updated.

Last update: 2026-11-14 15:54:58 UTC


README

Vendor profiles, ownership, onboarding status and moderation for Laravel 12 and 13 marketplace applications.

Features

  • Create vendor profiles owned by any Eloquent model.
  • Polymorphic owner relationship.
  • Vendor name, slug, description and contact fields.
  • Pending, approved, rejected and suspended statuses.
  • Approve/reject/suspend vendor profiles.
  • Query approved vendors.
  • Find vendors by slug.
  • JSON metadata.
  • Configurable table prefix.

Requirements

  • PHP 8.3+
  • Laravel 12 or 13

Installation

composer require itmosoft/laravel-vendors
php artisan vendor:publish --tag=itmosoft-vendors-config
php artisan migrate

By default, the migration creates itmosoft_vendors. Configure table_prefix before migrating if required.

Create a vendor

use ItmoSoft\Vendors\VendorManager;

$manager = app(VendorManager::class);

$vendor = $manager->create(
    owner: auth()->user(),
    name: 'Acme Home Goods',
    attributes: [
        'description' => 'Home and lifestyle products.',
        'email' => 'hello@example.com',
        'phone' => '+1 555 0100',
        'website' => 'https://example.com',
        'metadata' => ['registration_source' => 'seller-portal'],
    ],
);

New vendors default to pending.

Moderate a vendor

$manager->moderate($vendor, 'approved');
$manager->moderate($vendor, 'rejected');
$manager->moderate($vendor, 'suspended');

Only approved vendors have approved_at set.

Query approved vendors

$vendors = $manager->approved()->latest()->paginate(20);
$vendor = $manager->findBySlug('acme-home-goods');

Important scope and production notes

  • This package provides vendor profile persistence and status management, not a complete marketplace.
  • Vendor registration routes, dashboards, authorization policies, KYC/document verification, commissions, payouts, product ownership, storefront pages and notifications are outside this package.
  • Enforce unique slug generation and handle database unique-constraint errors if concurrent vendor registrations can create the same slug. This package does not automatically append a suffix.
  • Restrict moderation actions to authorized administrators in the host application.
  • The owner relation is polymorphic. Restrict allowed owner model types in your application.
  • The package does not enforce vendor email uniqueness or verify ownership of email/website addresses.
  • Add tenant scopes, audit logging, soft deletes and data-retention rules as required by your marketplace.

Testing

composer install
composer validate --strict
composer test

License

MIT. See LICENSE.