MicroFrameWork/app/models/Question.php

19 lines
370 B
PHP
Raw Normal View History

2024-07-03 14:41:15 +03:00
<?php
2024-07-03 15:15:59 +03:00
namespace app\models;
2024-07-03 14:41:15 +03:00
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');
}
}