wangmingchuan 11 months ago
parent b79abdd5c8
commit 2581489402
  1. 8
      .idea/.gitignore
  2. 15
      .idea/deployment.xml
  3. 8
      .idea/modules.xml
  4. 101
      .idea/php.xml
  5. 107
      .idea/shipin.iml
  6. 6
      .idea/vcs.xml
  7. 14
      .idea/webServers.xml
  8. 64
      app/api/controller/v1/complaint/ComplaintController.php
  9. 144
      app/model/activity/advance/Student.php

8
.idea/.gitignore vendored

@ -0,0 +1,8 @@
# 默认忽略的文件
/shelf/
/workspace.xml
# 基于编辑器的 HTTP 客户端请求
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PublishConfigData" autoUpload="On explicit save action" serverName="1" remoteFilesAllowedToDisappearOnAutoupload="false">
<serverData>
<paths name="1">
<serverdata>
<mappings>
<mapping deploy="/" local="$PROJECT_DIR$" web="/" />
</mappings>
</serverdata>
</paths>
</serverData>
<option name="myAutoUpload" value="ON_EXPLICIT_SAVE" />
</component>
</project>

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/shipin.iml" filepath="$PROJECT_DIR$/.idea/shipin.iml" />
</modules>
</component>
</project>

@ -0,0 +1,101 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PhpIncludePathManager">
<include_path>
<path value="$PROJECT_DIR$/vendor/fastknife/ajcaptcha" />
<path value="$PROJECT_DIR$/vendor/alipaysdk/easysdk" />
<path value="$PROJECT_DIR$/vendor/godruoyi/php-snowflake" />
<path value="$PROJECT_DIR$/vendor/danielstjules/stringy" />
<path value="$PROJECT_DIR$/vendor/mtdowling/jmespath.php" />
<path value="$PROJECT_DIR$/vendor/grpc/grpc" />
<path value="$PROJECT_DIR$/vendor/doctrine/cache" />
<path value="$PROJECT_DIR$/vendor/doctrine/lexer" />
<path value="$PROJECT_DIR$/vendor/overtrue/wechat" />
<path value="$PROJECT_DIR$/vendor/doctrine/annotations" />
<path value="$PROJECT_DIR$/vendor/qcloud_sts/qcloud-sts-sdk" />
<path value="$PROJECT_DIR$/vendor/overtrue/socialite" />
<path value="$PROJECT_DIR$/vendor/qcloud/cos-sdk-v5" />
<path value="$PROJECT_DIR$/vendor/phpoffice/phpspreadsheet" />
<path value="$PROJECT_DIR$/vendor/volcengine/volc-sdk-php" />
<path value="$PROJECT_DIR$/vendor/guzzlehttp/psr7" />
<path value="$PROJECT_DIR$/vendor/guzzlehttp/promises" />
<path value="$PROJECT_DIR$/vendor/guzzlehttp/guzzle" />
<path value="$PROJECT_DIR$/vendor/markbaker/matrix" />
<path value="$PROJECT_DIR$/vendor/markbaker/complex" />
<path value="$PROJECT_DIR$/vendor/qiniu/php-sdk" />
<path value="$PROJECT_DIR$/vendor/xaboy/form-builder" />
<path value="$PROJECT_DIR$/vendor/xin/container" />
<path value="$PROJECT_DIR$/vendor/xin/helper" />
<path value="$PROJECT_DIR$/vendor/league/flysystem" />
<path value="$PROJECT_DIR$/vendor/league/mime-type-detection" />
<path value="$PROJECT_DIR$/vendor/myclabs/php-enum" />
<path value="$PROJECT_DIR$/vendor/topthink/think-queue" />
<path value="$PROJECT_DIR$/vendor/alibabacloud/iot-20180120" />
<path value="$PROJECT_DIR$/vendor/topthink/think-view" />
<path value="$PROJECT_DIR$/vendor/alibabacloud/dysmsapi-20170525" />
<path value="$PROJECT_DIR$/vendor/symfony/translation-contracts" />
<path value="$PROJECT_DIR$/vendor/composer" />
<path value="$PROJECT_DIR$/vendor/topthink/think-helper" />
<path value="$PROJECT_DIR$/vendor/alibabacloud/darabonba-openapi" />
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-mbstring" />
<path value="$PROJECT_DIR$/vendor/topthink/think-migration" />
<path value="$PROJECT_DIR$/vendor/alibabacloud/endpoint-util" />
<path value="$PROJECT_DIR$/vendor/symfony/translation" />
<path value="$PROJECT_DIR$/vendor/topthink/think-factory" />
<path value="$PROJECT_DIR$/vendor/alibabacloud/tea-utils" />
<path value="$PROJECT_DIR$/vendor/symfony/var-dumper" />
<path value="$PROJECT_DIR$/vendor/topthink/think-captcha" />
<path value="$PROJECT_DIR$/vendor/alibabacloud/credentials" />
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-php72" />
<path value="$PROJECT_DIR$/vendor/topthink/think-filesystem" />
<path value="$PROJECT_DIR$/vendor/alibabacloud/gateway-spi" />
<path value="$PROJECT_DIR$/vendor/symfony/psr-http-message-bridge" />
<path value="$PROJECT_DIR$/vendor/topthink/framework" />
<path value="$PROJECT_DIR$/vendor/alibabacloud/linkvisual-20180120" />
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-intl-normalizer" />
<path value="$PROJECT_DIR$/vendor/topthink/think-orm" />
<path value="$PROJECT_DIR$/vendor/alibabacloud/tea-fileform" />
<path value="$PROJECT_DIR$/vendor/symfony/event-dispatcher" />
<path value="$PROJECT_DIR$/vendor/topthink/think-template" />
<path value="$PROJECT_DIR$/vendor/alibabacloud/tea-xml" />
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-intl-idn" />
<path value="$PROJECT_DIR$/vendor/topthink/think-image" />
<path value="$PROJECT_DIR$/vendor/alibabacloud/openapi-util" />
<path value="$PROJECT_DIR$/vendor/guzzle/guzzle" />
<path value="$PROJECT_DIR$/vendor/symfony/http-foundation" />
<path value="$PROJECT_DIR$/vendor/topthink/think-multi-app" />
<path value="$PROJECT_DIR$/vendor/alibabacloud/tea" />
<path value="$PROJECT_DIR$/vendor/symfony/process" />
<path value="$PROJECT_DIR$/vendor/dh2y/think-qrcode" />
<path value="$PROJECT_DIR$/vendor/pimple/pimple" />
<path value="$PROJECT_DIR$/vendor/intervention/image" />
<path value="$PROJECT_DIR$/vendor/spatie/macroable" />
<path value="$PROJECT_DIR$/vendor/google/longrunning" />
<path value="$PROJECT_DIR$/vendor/lizhichao/one-sm" />
<path value="$PROJECT_DIR$/vendor/google/gax" />
<path value="$PROJECT_DIR$/vendor/lizhichao/word" />
<path value="$PROJECT_DIR$/vendor/google/protobuf" />
<path value="$PROJECT_DIR$/vendor/google/grpc-gcp" />
<path value="$PROJECT_DIR$/vendor/aws/aws-sdk-php" />
<path value="$PROJECT_DIR$/vendor/google/auth" />
<path value="$PROJECT_DIR$/vendor/google/common-protos" />
<path value="$PROJECT_DIR$/vendor/ralouphie/getallheaders" />
<path value="$PROJECT_DIR$/vendor/adbario/php-dot-notation" />
<path value="$PROJECT_DIR$/vendor/songshenzong/support" />
<path value="$PROJECT_DIR$/vendor/workerman/crontab" />
<path value="$PROJECT_DIR$/vendor/workerman/channel" />
<path value="$PROJECT_DIR$/vendor/aliyuncs/oss-sdk-php" />
<path value="$PROJECT_DIR$/vendor/monolog/monolog" />
<path value="$PROJECT_DIR$/vendor/workerman/workerman" />
<path value="$PROJECT_DIR$/vendor/psr/http-message" />
<path value="$PROJECT_DIR$/vendor/psr/simple-cache" />
<path value="$PROJECT_DIR$/vendor/nesbot/carbon" />
<path value="$PROJECT_DIR$/vendor/psr/log" />
<path value="$PROJECT_DIR$/vendor/psr/cache" />
<path value="$PROJECT_DIR$/vendor/psr/container" />
<path value="$PROJECT_DIR$/vendor/maennchen/zipstream-php" />
<path value="$PROJECT_DIR$/vendor/firebase/php-jwt" />
</include_path>
</component>
<component name="PhpProjectSharedConfiguration" php_language_level="7.1" />
</project>

@ -0,0 +1,107 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/app" isTestSource="false" packagePrefix="app\" />
<sourceFolder url="file://$MODULE_DIR$/crmeb" isTestSource="false" packagePrefix="crmeb\" />
<sourceFolder url="file://$MODULE_DIR$/extend" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/vendor/fastknife/ajcaptcha" />
<excludeFolder url="file://$MODULE_DIR$/vendor/alipaysdk/easysdk" />
<excludeFolder url="file://$MODULE_DIR$/vendor/godruoyi/php-snowflake" />
<excludeFolder url="file://$MODULE_DIR$/vendor/danielstjules/stringy" />
<excludeFolder url="file://$MODULE_DIR$/vendor/mtdowling/jmespath.php" />
<excludeFolder url="file://$MODULE_DIR$/vendor/grpc/grpc" />
<excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/cache" />
<excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/lexer" />
<excludeFolder url="file://$MODULE_DIR$/vendor/overtrue/wechat" />
<excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/annotations" />
<excludeFolder url="file://$MODULE_DIR$/vendor/qcloud_sts/qcloud-sts-sdk" />
<excludeFolder url="file://$MODULE_DIR$/vendor/overtrue/socialite" />
<excludeFolder url="file://$MODULE_DIR$/vendor/qcloud/cos-sdk-v5" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpoffice/phpspreadsheet" />
<excludeFolder url="file://$MODULE_DIR$/vendor/volcengine/volc-sdk-php" />
<excludeFolder url="file://$MODULE_DIR$/vendor/guzzlehttp/psr7" />
<excludeFolder url="file://$MODULE_DIR$/vendor/guzzlehttp/promises" />
<excludeFolder url="file://$MODULE_DIR$/vendor/guzzlehttp/guzzle" />
<excludeFolder url="file://$MODULE_DIR$/vendor/markbaker/matrix" />
<excludeFolder url="file://$MODULE_DIR$/vendor/markbaker/complex" />
<excludeFolder url="file://$MODULE_DIR$/vendor/qiniu/php-sdk" />
<excludeFolder url="file://$MODULE_DIR$/vendor/xaboy/form-builder" />
<excludeFolder url="file://$MODULE_DIR$/vendor/xin/container" />
<excludeFolder url="file://$MODULE_DIR$/vendor/xin/helper" />
<excludeFolder url="file://$MODULE_DIR$/vendor/league/flysystem" />
<excludeFolder url="file://$MODULE_DIR$/vendor/league/mime-type-detection" />
<excludeFolder url="file://$MODULE_DIR$/vendor/myclabs/php-enum" />
<excludeFolder url="file://$MODULE_DIR$/vendor/topthink/think-queue" />
<excludeFolder url="file://$MODULE_DIR$/vendor/alibabacloud/iot-20180120" />
<excludeFolder url="file://$MODULE_DIR$/vendor/topthink/think-view" />
<excludeFolder url="file://$MODULE_DIR$/vendor/alibabacloud/dysmsapi-20170525" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/translation-contracts" />
<excludeFolder url="file://$MODULE_DIR$/vendor/composer" />
<excludeFolder url="file://$MODULE_DIR$/vendor/topthink/think-helper" />
<excludeFolder url="file://$MODULE_DIR$/vendor/alibabacloud/darabonba-openapi" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-mbstring" />
<excludeFolder url="file://$MODULE_DIR$/vendor/topthink/think-migration" />
<excludeFolder url="file://$MODULE_DIR$/vendor/alibabacloud/endpoint-util" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/translation" />
<excludeFolder url="file://$MODULE_DIR$/vendor/topthink/think-factory" />
<excludeFolder url="file://$MODULE_DIR$/vendor/alibabacloud/tea-utils" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/var-dumper" />
<excludeFolder url="file://$MODULE_DIR$/vendor/topthink/think-captcha" />
<excludeFolder url="file://$MODULE_DIR$/vendor/alibabacloud/credentials" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-php72" />
<excludeFolder url="file://$MODULE_DIR$/vendor/topthink/think-filesystem" />
<excludeFolder url="file://$MODULE_DIR$/vendor/alibabacloud/gateway-spi" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/psr-http-message-bridge" />
<excludeFolder url="file://$MODULE_DIR$/vendor/topthink/framework" />
<excludeFolder url="file://$MODULE_DIR$/vendor/alibabacloud/linkvisual-20180120" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-intl-normalizer" />
<excludeFolder url="file://$MODULE_DIR$/vendor/topthink/think-orm" />
<excludeFolder url="file://$MODULE_DIR$/vendor/alibabacloud/tea-fileform" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/event-dispatcher" />
<excludeFolder url="file://$MODULE_DIR$/vendor/topthink/think-template" />
<excludeFolder url="file://$MODULE_DIR$/vendor/alibabacloud/tea-xml" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-intl-idn" />
<excludeFolder url="file://$MODULE_DIR$/vendor/topthink/think-image" />
<excludeFolder url="file://$MODULE_DIR$/vendor/alibabacloud/openapi-util" />
<excludeFolder url="file://$MODULE_DIR$/vendor/guzzle/guzzle" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/http-foundation" />
<excludeFolder url="file://$MODULE_DIR$/vendor/topthink/think-multi-app" />
<excludeFolder url="file://$MODULE_DIR$/vendor/alibabacloud/tea" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/process" />
<excludeFolder url="file://$MODULE_DIR$/vendor/dh2y/think-qrcode" />
<excludeFolder url="file://$MODULE_DIR$/vendor/pimple/pimple" />
<excludeFolder url="file://$MODULE_DIR$/vendor/intervention/image" />
<excludeFolder url="file://$MODULE_DIR$/vendor/spatie/macroable" />
<excludeFolder url="file://$MODULE_DIR$/vendor/google/longrunning" />
<excludeFolder url="file://$MODULE_DIR$/vendor/lizhichao/one-sm" />
<excludeFolder url="file://$MODULE_DIR$/vendor/google/gax" />
<excludeFolder url="file://$MODULE_DIR$/vendor/lizhichao/word" />
<excludeFolder url="file://$MODULE_DIR$/vendor/google/protobuf" />
<excludeFolder url="file://$MODULE_DIR$/vendor/google/grpc-gcp" />
<excludeFolder url="file://$MODULE_DIR$/vendor/aws/aws-sdk-php" />
<excludeFolder url="file://$MODULE_DIR$/vendor/google/auth" />
<excludeFolder url="file://$MODULE_DIR$/vendor/google/common-protos" />
<excludeFolder url="file://$MODULE_DIR$/vendor/ralouphie/getallheaders" />
<excludeFolder url="file://$MODULE_DIR$/vendor/adbario/php-dot-notation" />
<excludeFolder url="file://$MODULE_DIR$/vendor/songshenzong/support" />
<excludeFolder url="file://$MODULE_DIR$/vendor/workerman/crontab" />
<excludeFolder url="file://$MODULE_DIR$/vendor/workerman/channel" />
<excludeFolder url="file://$MODULE_DIR$/vendor/aliyuncs/oss-sdk-php" />
<excludeFolder url="file://$MODULE_DIR$/vendor/monolog/monolog" />
<excludeFolder url="file://$MODULE_DIR$/vendor/workerman/workerman" />
<excludeFolder url="file://$MODULE_DIR$/vendor/psr/http-message" />
<excludeFolder url="file://$MODULE_DIR$/vendor/psr/simple-cache" />
<excludeFolder url="file://$MODULE_DIR$/vendor/nesbot/carbon" />
<excludeFolder url="file://$MODULE_DIR$/vendor/psr/log" />
<excludeFolder url="file://$MODULE_DIR$/vendor/psr/cache" />
<excludeFolder url="file://$MODULE_DIR$/vendor/psr/container" />
<excludeFolder url="file://$MODULE_DIR$/vendor/maennchen/zipstream-php" />
<excludeFolder url="file://$MODULE_DIR$/vendor/firebase/php-jwt" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="WebServers">
<option name="servers">
<webServer id="709c973a-72c9-4cea-8f44-88c7e1729ea5" name="1" url="http://47.103.53.180">
<fileTransfer host="47.103.53.180" port="21">
<advancedOptions>
<advancedOptions dataProtectionLevel="Private" passiveMode="true" shareSSLContext="true" />
</advancedOptions>
</fileTransfer>
</webServer>
</option>
</component>
</project>

@ -5,6 +5,10 @@ namespace app\api\controller\v1\complaint;
use app\Request;
use app\services\crud\UserComplaintServices;
use crmeb\services\SpreadsheetExcelService;
use mysql_xdevapi\Exception;
use think\exception\ValidateException;
use app\model\activity\advance\student;
class ComplaintController
{
@ -31,21 +35,67 @@ class ComplaintController
{
}
/**
* 添加投诉
* 添加投诉 上传模板
*/
public function addComplaint(Request $request)
{
$data = $request->postMore([
['content', '']
]);
$data = $request->post();
//解析excel
if (!empty($data['type']) && $data['type'] == 1) {
$uploadDir = 'uploadsFile/';
if (!is_dir($uploadDir)) {
mkdir($uploadDir, 0777, true);
}
$tempName = $_FILES['file']['tmp_name'];
$targetName = $uploadDir . basename($_FILES['file']['name']);
// 将临时文件移动到目标位置
if (move_uploaded_file($tempName, $targetName)) {
$ff = 'https://' . $_SERVER['HTTP_HOST'] . '/' . $targetName;
$content = file_get_contents($ff);
$array = explode(PHP_EOL, $content);
$length = count($array);
foreach ($array as $k => $v) {
if ($k != 0 && $k != $length) {
if (preg_match('/(.*?)(\d+)(.*)/', $v, $matches)) {
$beforeNumber = $matches[1]; // 第一个数字之前的字符
$number = $matches[2]; // 第一个数字
//插入数据
}
}
}
// $objPHPExcel = \PhpOffice\PhpSpreadsheet\IOFactory::load($ff);
}
return app('json')->fail('文件上传失败');
}
if (empty($data['content'])) {
return app('json')->fail(100100);
}
if (!empty($data['image'])) {
// 去除 base64 编码的前缀(如果有的话)
$decodedData = base64_decode($data['image']);
$imageName = uniqid() . '.png'; // 使用 uniqid 生成唯一的文件名
$savePath = 'uploads/' . $imageName; // 指定保存目录和文件名
// 将解码后的数据保存为文件
if (file_put_contents($savePath, $decodedData)) {
// 图片保存成功,获取图片地址
$imageUrl = 'http://' . $_SERVER['HTTP_HOST'] . '/uploads/' . $imageName;
$data['image'] = $imageUrl;
}
}
$user = $request->user()->toArray();
// echo '<pre>';
// var_dump($user);
// return false;
$data['school_id'] = $user['school_id'];
$data['user_id'] = $user['uid'];
$data['user_name'] = $user['real_name'];

@ -0,0 +1,144 @@
<?php
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
namespace app\model\activity\advance;
use app\model\product\product\StoreDescription;
use app\model\product\product\StoreProduct;
use crmeb\basic\BaseModel;
use crmeb\traits\ModelTrait;
use think\Model;
/**
* TODO 预售商品Model
* Class StoreSeckill
* @package app\model\activity
*/
class Student extends BaseModel
{
/**
* 数据表主键
* @var string
*/
protected $pk = 'id';
/**
* 模型名称
* @var string
*/
protected $name = 'student';
use ModelTrait;
/**
* 一对一关联
* 商品关联商品商品详情
* @return \think\model\relation\HasOne
*/
public function description()
{
return $this->hasOne(StoreDescription::class, 'product_id', 'id')->where('type', 6)->bind(['description']);
}
/**
* 一对一关联
* 商品关联商品商品详情
* @return \think\model\relation\HasOne
*/
public function product()
{
return $this->hasOne(StoreProduct::class, 'id', 'product_id')->where('is_show', 1)->where('is_del', 0)->field(['id', 'cate_id'])->bind([
'cate_id' => 'cate_id'
]);
}
/**
* 添加时间获取器
* @param $value
* @return false|string
*/
protected function getAddTimeAttr($value)
{
if ($value) return date('Y-m-d H:i:s', (int)$value);
return '';
}
/**
* 图片获取器
* @param $value
* @return array|mixed
*/
protected function getImagesAttr($value)
{
return json_decode($value, true) ?: [];
}
/**
* 秒杀商品名称搜索器
* @param Model $query
* @param $value
* @param $query
*/
public function searchTitleAttr($query, $value)
{
if ($value !== '') $query->where('title|id', 'like', '%' . $value . '%');
}
/**
* 是否删除搜索器
* @param Model $query
* @param $value
* @param $data
*/
public function searchIsDelAttr($query, $value, $data)
{
$query->where('is_del', $value ?? 0);
}
/**
* 状态搜索器
* @param Model $query
* @param $value
* @param $data
*/
public function searchStatusAttr($query, $value, $data)
{
if ($value !== '') $query->where('status', $value);
}
/**
* 状态搜索器
* @param Model $query
* @param $value
* @param $data
*/
public function searchTypeAttr($query, $value, $data)
{
if ($value !== '') $query->where('type', $value);
}
/**
* 商品ID搜索器
* @param Model $query
* @param $value
* @param $data
*/
public function searchProductIdAttr($query, $value, $data)
{
if ($value) {
if (is_array($value)) {
$query->whereIn('product_id', $value);
} else {
$query->where('product_id', $value);
}
}
}
}
Loading…
Cancel
Save