优惠券小程序

SysFeedback.php 601B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Factories\HasFactory;
  4. use Illuminate\Database\Eloquent\Model;
  5. class SysFeedback extends Model
  6. {
  7. use HasFactory;
  8. protected $table = 'sys_feedback';
  9. public $timestamps = false;
  10. protected static $unguarded = true;
  11. /**
  12. * 意见反馈保存
  13. * */
  14. public static function saveFeedback($userId, $desc)
  15. {
  16. $feedbackModel = new self;
  17. $feedbackModel->user_id = $userId;
  18. $feedbackModel->desc = $desc;
  19. $result = $feedbackModel->save();
  20. return $result ? 0 : 1002;
  21. }
  22. }