From ad10a6467f76822b9289832eeb0d0ac2038b32d1 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Mon, 30 Dec 2019 16:57:13 +0100 Subject: Strip down for simple app for Greek verb λύω --- app/Form.php | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 app/Form.php (limited to 'app/Form.php') diff --git a/app/Form.php b/app/Form.php new file mode 100644 index 0000000..767c122 --- /dev/null +++ b/app/Form.php @@ -0,0 +1,36 @@ + + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +namespace HebrewParseTrainer; + +use Illuminate\Database\Eloquent\Model; + +class Form extends Model { + + protected $table = 'forms'; + public $timestamps = false; + protected $fillable = ['form', 'tense', 'mode', 'voice', 'person', 'number', 'gender', 'case']; + + const ACCEPTED_VOTE_COUNT = 5; + + public function otherParsings() { + return self::where('form', $this->form)->get() + ->filter(function($v){return $v->form === $this->form;}); + } + +} -- cgit v1.2.3