add hasMany
This commit is contained in:
@@ -15,4 +15,10 @@ class Document extends Model
|
||||
'name',
|
||||
'parent_id',
|
||||
];
|
||||
|
||||
public function childs() {
|
||||
|
||||
return $this->hasMany('App\Category','parent_id','id') ;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user