misaf/vendra-product
Composer 安装命令:
composer require misaf/vendra-product
包简介
The product module for the Vendra framework.
README 文档
README
Tenant-aware product management for Vendra applications.
Features
- Product categories
- Products
- Product prices per currency
- Filament resources on the
adminpanel
Requirements
- PHP 8.2+
- Laravel 12
- Filament 5
- Livewire 4
- Pest 4
- Tailwind CSS 4
misaf/vendra-tenantmisaf/vendra-usermisaf/vendra-currencymisaf/vendra-activity-log
Installation
composer require misaf/vendra-product php artisan vendor:publish --tag=vendra-product-migrations php artisan migrate
Optional translations publish:
php artisan vendor:publish --tag=vendra-product-translations
The service provider and Filament plugin are auto-registered.
Usage
Create a category:
use Misaf\VendraProduct\Models\ProductCategory; $category = ProductCategory::query()->create([ 'name' => ['en' => 'Beverages'], 'description' => ['en' => 'Cold and hot drinks'], 'slug' => ['en' => 'beverages'], 'status' => true, ]);
Create a product:
use Misaf\VendraProduct\Models\Product; $product = Product::query()->create([ 'product_category_id' => $category->id, 'name' => ['en' => 'Orange Juice'], 'description' => ['en' => 'Fresh and natural'], 'slug' => ['en' => 'orange-juice'], 'quantity' => 20, 'stock_threshold' => 5, 'in_stock' => true, 'available_soon' => false, ]);
Add a price:
use Misaf\VendraProduct\Models\ProductPrice; ProductPrice::query()->create([ 'product_id' => $product->id, 'currency_code' => 'USD', 'price' => 9900, ]);
Load products with relationships:
$products = Product::query() ->with(['productCategory', 'latestProductPrice']) ->get();
Filament
Resources are available in the Products cluster on the admin panel:
- Product Categories
- Products
- Product Prices
Testing
composer test
License
MIT. See LICENSE.
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 3
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-02-12