2016-03-05 00:18:10 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Models;
|
2016-02-29 15:59:36 +00:00
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
|
|
|
|
|
|
/**
|
2016-03-05 00:18:10 +00:00
|
|
|
* Description of Questions.
|
2016-02-29 15:59:36 +00:00
|
|
|
*
|
|
|
|
|
* @author Dave
|
|
|
|
|
*/
|
2016-03-05 00:18:10 +00:00
|
|
|
class Question extends MyBaseModel
|
|
|
|
|
{
|
2016-02-29 15:59:36 +00:00
|
|
|
use SoftDeletes;
|
2016-03-05 00:18:10 +00:00
|
|
|
|
2016-03-14 16:37:38 +00:00
|
|
|
/**
|
|
|
|
|
* The events associated with the question.
|
|
|
|
|
*
|
|
|
|
|
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
|
|
|
|
|
*/
|
2016-03-05 00:18:10 +00:00
|
|
|
public function events()
|
|
|
|
|
{
|
2016-02-29 15:59:36 +00:00
|
|
|
return $this->belongsToMany('\App\Models\Event');
|
|
|
|
|
}
|
2016-03-05 00:18:10 +00:00
|
|
|
|
2016-03-14 16:37:38 +00:00
|
|
|
/**
|
|
|
|
|
* The type associated with the question.
|
|
|
|
|
*
|
|
|
|
|
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
|
|
|
|
*/
|
2016-03-05 00:18:10 +00:00
|
|
|
public function question_types()
|
|
|
|
|
{
|
2016-02-29 15:59:36 +00:00
|
|
|
return $this->hasOne('\App\Models\QuestionType');
|
|
|
|
|
}
|
|
|
|
|
}
|