/**
  * Register custom form macros on package start
  * @return void
  */
 public function boot()
 {
     Form::macro('uploadcare', function ($name, $value = null, $options = array()) {
         $options = array_merge($options, array('role' => 'uploadcare-uploader', 'value' => $value));
         return Form::input('hidden', $name, $value, $options);
     });
 }
Beispiel #2
0
 /**
  * 渲染当前对象
  * @return string
  */
 public function render() : string
 {
     return FormFacade::input('text', $this->elementName(), $this->value()->show(), ['id' => $this->elementId(), 'class' => 'form-control']);
 }
Beispiel #3
0
 protected function renderEditable() : string
 {
     return FormFacade::input('text', $this->elementName(), $this->getCurrentValue() ?? $this->getOriginalValue(), $this->getAttributes());
 }