diff --git a/app/Models/Document.php b/app/Models/Document.php index 742e5b0..1ed1d2e 100644 --- a/app/Models/Document.php +++ b/app/Models/Document.php @@ -15,4 +15,10 @@ class Document extends Model 'name', 'parent_id', ]; + + public function childs() { + + return $this->hasMany('App\Category','parent_id','id') ; + + } }