FEATURE #1453: add registration of templates
This commit is contained in:
@@ -10,6 +10,15 @@ use Illuminate\Database\Eloquent\Model;
|
||||
class TemplatePath extends Model
|
||||
{
|
||||
public $timestamps = true;
|
||||
protected $fillable = ['name'];
|
||||
protected $fillable = ['name', 'path', 'parent_id', 'namespace'];
|
||||
protected $guarded = [];
|
||||
|
||||
/**
|
||||
* In one path may be many templates
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function templates() {
|
||||
return $this->hasMany('App\Models\Template', 'path');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user