beikeshop多商户跨境电商独立站最新版v1.6.0版本源码

一.介绍

beikeshop跨境电商独立站最新版V1.6.0源码

多商户 多商家 多语言 多币结算

本博主亲测搭建代码全开源质量相对来说很稳定的

二.服务器环境

系统:CentOS、

环境:PHP7.4+ Nginx 1.21 + MySQL 5.6

常见插件:fileinfo ; redis

三.系统效果图片(图片仅测试参考,无实际运营)

后端beike/AdminApi/Brand.php控制器代码:

复制代码
<?php
/**
 * BrandController.php
 *
 * @copyright  2023 beikeshop.com - All Rights Reserved
 * @link       https://beikeshop.com
 * @author     Edward Yang <yangjin@guangda.work>
 * @created    2023-04-20 17:19:51
 * @modified   2023-04-20 17:19:51
 */

namespace Beike\AdminAPI\Controllers;

use Beike\Models\Brand;
use Beike\Repositories\BrandRepo;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;

class BrandController
{
    /**
     * 显示品牌列表
     * @param Request $request
     * @return mixed
     */
    public function index(Request $request)
    {
        $brands = BrandRepo::list($request->only('name', 'first', 'status'));
        $data   = [
            'brands' => $brands,
        ];

        return hook_filter('admin_api.brand.index.data', $data);
    }

    /**
     * 创建品牌
     *
     * @param Request $request
     * @param Brand   $brand
     * @return Brand
     */
    public function show(Request $request, Brand $brand): Brand
    {
        return hook_filter('admin_api.brand.show.data', $brand);
    }

    /**
     * 创建品牌
     *
     * @param Request $request
     * @return JsonResponse
     */
    public function store(Request $request): JsonResponse
    {
        $requestData = $request->all();
        $data        = [
            'request_data' => $requestData,
        ];

        hook_action('admin_api.brand.store.before', $data);
        $brand = BrandRepo::create($requestData);
        hook_action('admin_api.brand.store.after', ['brand' => $brand, 'request_data' => $requestData]);

        return json_success(trans('common.created_success'), $brand);
    }
相关推荐
麦麦麦当劳大王9 小时前
【油猴脚本】Boss直聘 岗位职责复制
开发语言·前端·javascript
小lu飞10 小时前
2026小红书小工具怎么制作:纯前端 ZIP 打包、沙箱限制与笔记挂载流程
前端·笔记·ai·ai编程
smallcelebration10 小时前
151 从0开始搭建后端项目
前端·firefox
wangruofeng10 小时前
手机和电脑传文件,除了微信还有 LocalSend
前端
excel11 小时前
基于 GPT 的自动发布文章接口方案:从一句话或一张图片生成并发布内容
前端·javascript·后端
东鹏特饮13 小时前
系统运维(传统/通用运维)面试题
开发语言·php
其实防守也摸鱼13 小时前
个人学习 Pwn 思路:从基础到漏洞利用的进阶路径
大数据·前端·人工智能·chrome·算法·安全·网络安全
朱涛的自习室13 小时前
212 个需求、22 万行代码:Agent 接管开源项目的 19 天
android·前端·人工智能
aZhe的全栈知识分享13 小时前
AI 还原 Figma 效果总达不到预期?先别急着让它写代码
前端·后端·面试
review4454313 小时前
Codex Hooks 入门实战:生命周期事件、matcher 与5分钟跑通一个钩子
前端·agent·vibecoding