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);
    }
相关推荐
G佳伟12 分钟前
‌微信小程序Webview转发页面空白问题解决方案‌
微信小程序·小程序
颜酱30 分钟前
package.json 配置指南
前端·javascript·node.js
todoitbo36 分钟前
基于 DevUI MateChat 搭建前端编程学习智能助手:从痛点到解决方案
前端·学习·ai·状态模式·devui·matechat
oden41 分钟前
SEO听不懂?看完这篇你明天就能优化网站了
前端
IT_陈寒1 小时前
React性能优化:这5个Hooks技巧让我减少了40%的重新渲染
前端·人工智能·后端
Sunhen_Qiletian1 小时前
《Python开发之语言基础》第六集:操作文件
前端·数据库·python
珑墨1 小时前
【唯一随机数】如何用JavaScript的Set生成唯一的随机数?
开发语言·前端·javascript·ecmascript
L***d6701 小时前
十七:Spring Boot依赖 (2)-- spring-boot-starter-web 依赖详解
前端·spring boot·后端
少云清1 小时前
【功能测试】6_Web端抓包 _Fiddler抓包工具的应用
前端·功能测试·fiddler
豐儀麟阁贵1 小时前
8.5在方法中抛出异常
java·开发语言·前端·算法