123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
- namespace App\Http\Controllers\Api\Repositories;
- use App\Models\User\WxUserReport as Model;
- class WxUserReportRepositories
- {
- /**
- * Model.
- *
- * @var string
- */
- protected $eloquentClass = Model::class;
- /**
- * 举报添加数据
- * @param
- * @return bool
- */
- public static function add($uid,$type, $object_id, $report_type, $report_message, $report_imgs, $contact)
- {
- if(_empty_($contact)){
- $contact = '';
- }
- if(_empty_($report_message)){
- $report_message = '';
- }
- $feedbackModel = new Model();
- $feedbackModel->user_id = $uid;
- $feedbackModel->type = $type;
- $feedbackModel->object_id = $object_id;
- $feedbackModel->report_type = $report_type;
- $feedbackModel->report_message = $report_message;
- $feedbackModel->report_imgs = implode(',', $report_imgs);
- $feedbackModel->contact = $contact;
- return $feedbackModel->save();
- }
- }
|