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);
    }
相关推荐
子兮曰3 天前
jev-ultrafast 深度解析:7 秒订机票的浏览器 Agent 是如何炼成的
前端·后端·agent
damoluomu3 天前
挑 PHP CMS 之前,先学会看它的协议
php
子兮曰3 天前
Jev 爆发一周:7 秒 Agent 背后的 System One 生态与三场争议
前端·后端·ai编程
前端小万3 天前
写公众号赚了 3000 块后,我做了一款叫 "一键成稿" 的软件
前端·微信小程序
爱勇宝3 天前
ZCode 开源 24 小时:一份没有历史的账本,回答不了"有没有偷代码"
前端·后端·chatglm (智谱)
三十而立洋3 天前
Cookie 详解:从产生到安全,一次讲透
前端·javascript
卡布鲁3 天前
把一个 Vite + Vue3 应用塞进 qiankun (React + Umi3) 主站:十个坑的复盘
前端·javascript·react.js
MoonMoonLee3 天前
小程序配置
小程序
汉堡大王95273 天前
Jev:不是聊天机器人, 而是一个智能 if 语句
前端·人工智能·后端
梦想很大很大3 天前
从运行事实到回归证据:Workrun 的 Telemetry 与 Evaluation 实践
前端·人工智能·后端