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 +++++++--- resources/views/trainer.blade.php | 14 ++++++++++---- 2 files changed, 17 insertions(+), 7 deletions(-) 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'); + } } diff --git a/resources/views/trainer.blade.php b/resources/views/trainer.blade.php index 9bfb5a8..861b28f 100644 --- a/resources/views/trainer.blade.php +++ b/resources/views/trainer.blade.php @@ -1,10 +1,16 @@ + + @extends('layouts.with_sidebar') @section('sidebar')