backend/app/models/Question.php

22 lines
427 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;
2024-07-24 16:31:07 +03:00
/**
* @method static where(string $string, $user_id)
*/
2024-07-03 14:41:15 +03:00
class Question extends Model {
2024-07-10 14:39:37 +03:00
protected $table = 'question';
2024-07-03 14:41:15 +03:00
protected $fillable = ['question','user_id'];
public function answers()
{
return $this->hasMany('\Models\Answer');
}
public function user()
{
return $this->belongsTo('\Models\User');
}
}