From b9c709fc55e07ca085b0397844aa13d5d53f6964 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Tue, 6 Sep 2016 00:28:21 +0200 Subject: Root kinds on trainer page --- app/Root.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'app') diff --git a/app/Root.php b/app/Root.php index 6c0f033..2e21c4e 100644 --- a/app/Root.php +++ b/app/Root.php @@ -22,8 +22,12 @@ use Illuminate\Database\Eloquent\Model; class Root extends Model { - protected $table = 'roots'; - public $timestamps = false; - protected $fillable = ['root', 'root_kind_id']; + protected $table = 'roots'; + public $timestamps = false; + protected $fillable = ['root', 'root_kind_id']; + + public function kind() { + return $this->belongsTo('HebrewParseTrainer\RootKind', 'root_kind_id'); + } } -- cgit v1.2.3