24 lines
500 B
PHP
24 lines
500 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* Class CustomFieldType
|
|
*/
|
|
class TemplatePath extends Model
|
|
{
|
|
public $timestamps = true;
|
|
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');
|
|
}
|
|
} |