承接 veiliglanceren/laravel-webshop-product 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

veiliglanceren/laravel-webshop-product

最新稳定版本:1.4.0

Composer 安装命令:

composer require veiliglanceren/laravel-webshop-product

包简介

Collection of resources for implementing a product structure in Laravel e-commerce projects

README 文档

README

This package provides a modular way to manage products for your Laravel webshop. It is designed to be simple, extendable, and easily integrated into existing Laravel projects.

Features

  • Product model with Eloquent support
  • Easy CRUD operations for products
  • Migration and configuration publishing
  • Extendable for custom features

Installation

Require the package via Composer:

composer require veiliglanceren/laravel-webshop-product

Publish Assets

To publish configuration, migrations, and other assets:

php artisan vendor:publish --provider="VeiligLanceren\LaravelWebshopProduct\ProductServiceProvider"

Database Migration

Run the migrations to create the necessary tables:

php artisan migrate

Usage

Product Model

Use the provided Product model directly or extend it:

use VeiligLanceren\LaravelWebshopProduct\Models\WebshopProduct;

$products = WebshopProduct::all();

CRUD Example

// Create
$product = WebshopProduct::create([
    'name' => 'Example WebshopProduct',
    'price' => 99.99,
    'sku' => 'example-product'
]);

// Read
$product = WebshopProduct::find(1);

// Update
$product->update([
    'price' => 89.99,
]);

// Delete
$product->delete();

Database Structure

Table Columns
webshop_products id, name, slug, sku, price, description, is_visible, order, timestamps
webshop_product_images id, product_id, url, alt_text, is_primary, order, timestamps
webshop_product_variants id, product_id, name, sku, price, stock, is_default, order, timestamps

These tables support full product management, media handling, variant selection, and categorization using a polymorphic relationship.

Extending Functionality

You can extend the Product model or override views, controllers, and routes to fit your webshop needs.

Configuration

If you published the config file, you can customize package settings in:

config/product.php

Testing

Run tests with PHPUnit:

php artisan test

Contributing

Contributions, issues, and feature requests are welcome. Please follow the repository guidelines.

License

This package is open-sourced software licensed under the MIT license.

Links

统计信息

  • 总下载量: 172
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-07-17