aboutsummaryrefslogtreecommitdiff
path: root/app/Verb.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Verb.php')
-rw-r--r--app/Verb.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/app/Verb.php b/app/Verb.php
index aa0db26..3ff79fc 100644
--- a/app/Verb.php
+++ b/app/Verb.php
@@ -26,7 +26,7 @@ class Verb extends Model {
public $timestamps = false;
protected $fillable = ['verb', 'root', 'stem', 'tense', 'person', 'gender', 'number'];
- const ACCEPTED_VOTE_COUNT = 1;
+ const ACCEPTED_VOTE_COUNT = 5;
public function actions() {
return $this->hasMany('HebrewParseTrainer\VerbAction');
@@ -56,4 +56,16 @@ class Verb extends Model {
return 0;
}
+ public function suggestedBy() {
+ $suggs = $this->actions()
+ ->where('kind', VerbAction::KIND_SUGGEST)
+ ->get();
+
+ foreach ($suggs as $sugg) {
+ return $sugg->user;
+ }
+
+ return null;
+ }
+
}