kasperkloster/monkcommerce

Laravel 基础电子商务

v1.0.0 2019-10-31 12:39 UTC

This package is auto-updated.

Last update: 2024-09-26 06:14:29 UTC


README

安装

  • 安装一个新的 Laravel 项目。
  • 安装 laravel/ui 并运行 php artisan ui vue --auth
  • 运行 composer require kasperkloster/monkcommerce。
  • 进入 config/app.php > providers,添加:KasperKloster\MonkCommerce\Providers\MonkCommerceServiceProvider::class,
  • 运行 php artisan vendor:publish --tag=monkcommerce
  • 更新生成器并运行 php artisan db:seed
  • 创建管理员:运行 php artisan monkcommerce:admin
  • 创建商店信息:运行 php artisan monkcommerce:shop
  • 在 app/kernel, routeMiddleware 下注册 admin 中间件:'admin' => \KasperKloster\MonkCommerce\Middleware\AdminMiddleware::class,

视图

商店前端视图位于 /resources/views/monkcommerce-storefront/。

生成器

在 DatabaseSeeder.php 中粘贴

$this->call(McProductCategoriesTableSeeder::class);
$this->call(McProductsTableSeeder::class);
$this->call(McCategoryProductTableSeeder::class);
$this->call(McStaticPagesSeeder::class);
$this->call(McProductAttributesTableSeeder::class);
$this->call(McProductAttributeValuesTableSeeder::class);
$this->call(McProductAttrProductAttrValueTableSeeder::class);
$this->call(McShipmentCouriersTableSeeder::class);
$this->call(McOrdersStatusSeeder::class);
$this->call(McOrdersCustomerSeeder::class);
$this->call(McOrdersTableSeeder::class);
$this->call(McRolesTableSeeder::class);