19 lines
366 B
PHP
19 lines
366 B
PHP
<?php
|
|
namespace Models;
|
|
|
|
use \Illuminate\Database\Eloquent\Model;
|
|
|
|
class Question extends Model {
|
|
protected $table = 'Questions';
|
|
protected $fillable = ['question','user_id'];
|
|
|
|
public function answers()
|
|
{
|
|
return $this->hasMany('\Models\Answer');
|
|
}
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo('\Models\User');
|
|
}
|
|
} |