21 lines
376 B
PHP
21 lines
376 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Models;
|
||
|
|
|
||
|
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
|
||
|
|
class ServerQuestion extends Model
|
||
|
|
{
|
||
|
|
protected $fillable = [];
|
||
|
|
protected $guarded = [];
|
||
|
|
public function keywords()
|
||
|
|
{
|
||
|
|
return $this->hasMany(ServerQuestionKeyword::class, 'question_id', 'id');
|
||
|
|
}
|
||
|
|
|
||
|
|
public function answer()
|
||
|
|
{
|
||
|
|
return $this->hasOne(ServerAnswer::class, 'question_id', 'id');
|
||
|
|
}
|
||
|
|
}
|