首选的 PHP IDE,对 Laravel 及其生态系统提供广泛的开箱即用支持。

Laravel Shopper: A Headless E-Commerce Admin Panel for Laravel

最后更新于 经过

Laravel Shopper: A Headless E-Commerce Admin Panel for Laravel image

Laravel Shopper is an open-source headless e-commerce administration panel built on the TALL stack (Tailwind, Alpine, Laravel, Livewire). Rather than shipping a pre-built storefront, it focuses entirely on the back-office side — product catalogue, orders, customers, discounts, and team management — leaving you free to build the customer-facing frontend with whatever technology fits your project: React, Vue, Svelte, server-rendered Blade, or anything else.

安装

Shopper requires Laravel 11+ and PHP 8+. Install the package and run the installer:

作曲家 要求 shopper/framework
php 工匠 shopper:install

The install command runs migrations, seeds initial data, and sets up storage symlinks. Once that's done, create your first admin user:

php 工匠 shopper:user

You'll be prompted for a name, email, and password. The dashboard is then accessible at /cpanel/login

What's in the Box

Products & Catalog

The catalogue system is built around products, variants, attributes, categories, collections, and brands. Products support multiple variants with independent pricing, inventory tracking, and image galleries. Collections work similarly to categories but are more flexible — you can add products to them explicitly or define criteria-based rules for automatic inclusion.

订单

The order management interface provides a unified view of each order's lifecycle, including payment status, shipping details, and fulfilment. Store admins can process orders, update tracking information, and manage refunds from a single dashboard.

顾客

Customer profiles include purchase history, saved addresses, and contact information. The reviews module ties into this, letting customers leave feedback on products that admins can moderate.

折扣

Discount codes support configurable conditions such as minimum order amounts, usage limits, and expiration dates. This covers common promotional scenarios without needing a separate plugin.

角色和权限

Team access is managed through a role-based permission system. You can create staff accounts with scoped access — useful when you want your warehouse team to see orders and inventory but not pricing or discount configuration.

Two-Factor Authentication

Built-in 2FA is available for admin accounts, adding a second layer of security to the control panel without any extra setup.

Payment Gateway Integration

Shopper ships with a Stripe integration out of the box and a manual driver for cash-on-delivery or pay-in-person scenarios. The Stripe driver handles the full payment lifecycle — initiating a PaymentIntent, authorising, capturing, refunding, cancelling, and processing webhooks.

配置

The installer creates a config/shopper/ directory with separate files for admin settings, authentication, models, routes, and media. A few commonly adjusted options in config/shopper/admin.php :

'前缀' => 环境 'SHOPPER_PREFIX' , 'cpanel' ),
'pages' => [
'namespace' => '应用程序 \\ 活线 \\ Shopper' ,
'view_path' => resource_path 'views/livewire/shopper' ),
],
'brand' => 无效的 , // path to your logo, e.g. '/images/logo.svg'
'favicon' => 无效的 ,
'locales' => [
'在' => [ '标签' => 'English' , 'flag' => 'gb' ],
'fr' => [ '标签' => 'Français' , 'flag' => 'fr' ],
],

prefix key controls the URL segment for the entire admin panel. The pages key sets the namespace and view path for custom Livewire pages you add to the control panel.

Store-level settings — shop name, currency, address, social links — are stored in a Setting model and cached for one day. A shopper_setting() helper retrieves any value by key:

$货币 = shopper_setting 'shop_currency' (英文): // e.g., "USD"
$storeName = shopper_setting 'shop_name' (英文):

Extending the Control Panel

Shopper is designed to be extended rather than forked. The config/shopper/components/ directory contains a separate file for each entity (products, orders, customers, etc.), letting you swap out any default Livewire component with your own implementation on a per-resource basis.

Navigation items can also be extended via a service provider, allowing you to add entries to the sidebar without touching the package source.

入门套件

If you'd rather not build the storefront from scratch, Shopper offers official starter kits that give you a working storefront to get started. The Livewire starter kit is available now, built with Livewire 3, Flux UI, and Tailwind CSS v4 — covering product browsing, cart management, multi-step checkout with Stripe, customer accounts, and multi-currency support. An Inertia starter kit supporting Vue and React is currently in development.

Install a kit with:

php 工匠 shopper:kit:install shopper/livewire-starter-kit

The command backs up your project, validates version requirements, copies the kit files, and installs dependencies. The code is yours to modify fully from there.

AI-Ready with Laravel Boost

Shopper ships with built-in Laravel Boost support, providing three specialised skills that help AI agents understand the codebase from the first prompt. When installed, Boost detects the guidelines and skills automatically — no extra configuration needed:

  • shopper-development — coding standards, model patterns, and conventions
  • shopper-livewire — Livewire components with Filament Forms & Tables
  • extending-shopper — sidebar, events, overrides, and customisation

Works with Claude Code, Cursor, Windsurf, GitHub Copilot, and any other tool that supports Laravel Boost.

您可以在以下位置找到来源: GitHub 完整文档请见此处。 docs.laravelshopper.dev

Yannick Lyn Fatt 的照片

Laravel News 的特约撰稿人和全栈 Web 开发人员。

归档于:
立方体

Laravel 时事通讯

加入超过 4 万名开发者的行列,不错过任何新的技巧、教程等内容。

图像
Laravel 代码审查

几天内即可获得 Laravel 代码审查方面的专家指导

访问 Laravel 代码审查
SerpApi logo

SerpApi

Access real-time search engine results through a simple API—no more scraping headaches! Use it for AI applications, SEO tools, product research, travel information, and more

SerpApi
了解 Softtech 的标志

了解软科技

Acquaint Softtech 提供 AI 就绪的 Laravel 开发人员,48 小时内即可上手,每月费用为 3000 美元,没有冗长的销售流程,并提供 100% 退款保证。

了解软科技
Lucky Media 标志

幸运传媒

Get Lucky Now——拥有十余年经验的 Laravel 开发理想之选!

幸运传媒
Tinkerwell 徽标

廷克威尔

Laravel 开发者必备的代码运行器。可在本地和生产环境中体验 AI、自动补全和即时反馈功能。

廷克威尔
SaaSykit:Laravel SaaS 入门套件徽标

SaaSykit:Laravel SaaS 入门套件

SaaSykit 是一个多租户 Laravel SaaS 入门套件,包含运行现代 SaaS 所需的所有功能,例如支付、美观的结账界面、管理面板、用户仪表盘、身份验证、现成组件、统计数据、博客、文档等等。

SaaSykit:Laravel SaaS 入门套件
Shift 标志

转移

还在运行旧版本的 Laravel?立即实现 Laravel 自动升级和代码现代化,让您的应用程序保持最新状态。

转移
鱼叉:新一代时间跟踪和发票标志

Harpoon:新一代时间跟踪和发票系统

新一代时间跟踪和计费软件,帮助您的机构规划和预测盈利的未来。

Harpoon:新一代时间跟踪和发票系统
Laravel Cloud 标志

Laravel 云

轻松创建和管理服务器,并在几秒钟内部署 Laravel 应用程序。

Laravel 云
Kirschbaum 标志

樱桃树

提供创新和稳定性,确保您的Web应用程序取得成功。

樱桃树
PhpStorm 标志

PhpStorm

首选的 PHP IDE,对 Laravel 及其生态系统提供广泛的开箱即用支持。

PhpStorm
几天内即可获得 Laravel 代码审查徽标的专家指导

几天内即可获得 Laravel 代码审查方面的专家指导

专家级代码审查!两位拥有 10 年以上 Laravel 开发经验的开发者将为您提供清晰、实用的反馈,帮助团队构建更优质的应用程序。

几天内即可获得 Laravel 代码审查方面的专家指导
Laravel Installer Now Returns JSON When Running Inside an AI Agent image

Laravel Installer Now Returns JSON When Running Inside an AI Agent

阅读文章
Queue-Wide Inspection Methods in Laravel 13.8.0 image

Queue-Wide Inspection Methods in Laravel 13.8.0

阅读文章
Verifiable Audit Logging with Laravel Chronicle image

Verifiable Audit Logging with Laravel Chronicle

阅读文章
Ship AI with Laravel: Search Entire PDFs with Zero Search Logic image

Ship AI with Laravel: Search Entire PDFs with Zero Search Logic

阅读文章
Personalized Content Delivery System: Building an AI-powered recommendation engine with Laravel and MongoDB image

Personalized Content Delivery System: Building an AI-powered recommendation engine with Laravel and MongoDB

阅读文章
Laravel Brain: Visualize Your Application's Request Lifecycle image

Laravel Brain: Visualize Your Application's Request Lifecycle

阅读文章