mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-16 14:00:56 +08:00
[api] reward + thanks
This commit is contained in:
22
app/Models/PollAnswer.php
Normal file
22
app/Models/PollAnswer.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
|
||||
class PollAnswer extends NexusModel
|
||||
{
|
||||
protected $table = 'pollanswers';
|
||||
|
||||
protected $fillable = ['pollid', 'userid', 'selection',];
|
||||
|
||||
public function poll()
|
||||
{
|
||||
return $this->belongsTo(Poll::class, 'pollid');
|
||||
}
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'userid');
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user