FEATURE #1455: add template path overview
This commit is contained in:
@@ -18,7 +18,18 @@ class TemplatePath extends Model
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function templates() {
|
||||
public function templates()
|
||||
{
|
||||
return $this->hasMany('App\Models\Template', 'path');
|
||||
}
|
||||
|
||||
/**
|
||||
* List of all subdirectories of given path
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function subdirectories()
|
||||
{
|
||||
return $this->hasMany('App\Models\TemplatePath', 'parent_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user