1234567891011121314151617181920212223242526272829 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Factories\HasFactory;
- use Illuminate\Database\Eloquent\Model;
- class SysFeedback extends Model
- {
- use HasFactory;
- protected $table = 'sys_feedback';
- public $timestamps = false;
- protected static $unguarded = true;
- /**
- * 意见反馈保存
- * */
- public static function saveFeedback($userId, $desc)
- {
- $feedbackModel = new self;
- $feedbackModel->user_id = $userId;
- $feedbackModel->desc = $desc;
- $result = $feedbackModel->save();
- return $result ? 0 : 1002;
- }
- }
|