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);
    }
相关推荐
anOnion1 天前
构建无障碍组件之Switch Pattern
前端·html·交互设计
华洛1 天前
多写点skill吧,写的越多这行业死的越快。
前端·javascript·产品
剪刀石头布啊1 天前
从函数式编程介绍
前端
vjmap1 天前
全新唯杰WebCAD编辑平台发布:全面拥抱AI,WebCAD智能体(Agent)来了
前端·gis·ai编程
剪刀石头布啊1 天前
扫码登录方式
前端
剪刀石头布啊1 天前
浏览器指纹
前端
剪刀石头布啊1 天前
前端截图html2canvas
前端
IT_陈寒1 天前
别再死记硬背Python语法了!这5个思维模式让你代码量减半
前端·人工智能·后端
beata1 天前
Java基础-19:Java 死锁深度解析:从原理、检测到预防与实战指南
java·前端
Sunshine1111 天前
浏览器渲染zz
前端