<?php
namespace QxCMS\Modules\Client\Models\Questionnaire;
use Illuminate\Database\Eloquent\Model;
class Answer extends Model
{
protected $connection = 'client';
protected $table = 'survey_answers';
public $module_id = 5;
/*
* The attributes that are mass assignable.
*
* @var array
*/
protected $guarded = [];
protected $appends = ['hashid'];
/*
* Model Accessors
*/
public function getHashidAttribute()
{
return hashid($this->id);
}
public function question()
{
return $this->belongsTo('QxCMS\Modules\Client\Models\Questionnaire\Question', 'question_id');
}
/*
* Model Custom Functions
*/
}