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 Answer extends Model {
|
|
|
|
protected $table = 'Answers';
|
|
|
|
protected $fillable = ['answer','user_id','question_id'];
|
|
|
|
|
|
|
|
public function upvotes()
|
|
|
|
{
|
|
|
|
return $this->hasMany('\Models\Upvote');
|
|
|
|
}
|
|
|
|
}
|