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.
20 lines
450 B
PHTML
20 lines
450 B
PHTML
|
2 months ago
|
<?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');
|
||
|
|
}
|
||
|
|
}
|