| 1 | <?php namespace App\LaravelRestCms\Template; |
||
| 5 | class TemplateDetail extends BaseModel { |
||
| 6 | |||
| 7 | public static $searchCols = ['name', 'description', 'var']; |
||
| 8 | |||
| 9 | /** |
||
| 10 | * The database table used by the model. |
||
| 11 | * |
||
| 12 | * @var string |
||
| 13 | */ |
||
| 14 | protected $table = 'template_detail'; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * The attributes that are mass assignable. |
||
| 18 | * |
||
| 19 | * @var array |
||
| 20 | */ |
||
| 21 | protected $fillable = []; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * The attributes excluded from the model's JSON form. |
||
| 25 | * |
||
| 26 | * @var array |
||
| 27 | */ |
||
| 28 | protected $hidden = []; |
||
| 29 | |||
| 30 | public static $types = [ |
||
| 31 | 'wysiwyg' => 'HTML Editor', |
||
| 32 | 'image_picker' => 'Image Picker', |
||
| 33 | 'date_picker' => 'Date Picker', |
||
| 34 | 'select' => 'Select', |
||
| 35 | 'select_multiple' => 'Select Multiple', |
||
| 36 | 'text' => 'Text', |
||
| 37 | 'textarea' => 'Textarea', |
||
| 38 | 'repeater' => 'Repeating Group', |
||
| 39 | 'picker' => 'Picker', |
||
| 40 | 'info' => 'Info Box (Backend Only)', |
||
| 41 | ]; |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Joins the parent table |
||
| 45 | * |
||
| 46 | * @return \Illuminate\Database\Eloquent\Relations\hasOne |
||
| 47 | */ |
||
| 48 | public function parent() |
||
| 52 | |||
| 53 | } |
||
| 54 |