You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
virt/web/app/Models/UserSurveyQuestion.php

20 lines
450 B
PHP

<?php
namespace App\Models;
class UserSurveyQuestion extends Model
{
protected $connection = "default";
protected $table = "user_survey_questions";
public function options()
{
return $this->hasMany(UserSurveyOption::class, 'question_id', 'id')->orderBy('sort', 'asc')->orderBy('id', 'asc');
}
public function responses()
{
return $this->hasMany(UserSurveyResponse::class, 'question_id', 'id');
}
}