FEATURE #1455: add template path overview

This commit is contained in:
Michal Kváček
2016-02-18 18:19:52 +01:00
parent f3dde68481
commit d082cee7b5
10 changed files with 150 additions and 2 deletions
+12 -1
View File
@@ -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');
}
}