igfs/app/models/Question.php
2024-07-10 14:39:37 +03:00

19 lines
369 B
PHP

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