Add remote button as column

@param $name
@param string $label
@param string $link
@param array $binds
@param array $attr
@return \FrenchFrogs\Table\Column\Button
357418
public function addButtonCallback($name, $label = '%s', $link = '#', $binds = [], $method = 'post' )
    {
        return $this->addButton($name, $label, $link, $binds)->enableCallback($method);
    }
800044
public function addButton($name, $label, $attr = [] )
    {
        $e = new \FrenchFrogs\Form\Element\Button($name, $label, $attr);
        $this->addElement($e);
        return $e;
    }
1277188
public function addDatetime($name, $label = '', $format = null, $attr = [])
    {
        $c = new Column\Datetime($name, $label, $format, $attr);
        $this->addColumn($c);
        return $c;
    }
1270373
public function setToggle($label)
    {
        if ($label instanceof Button) {
            $this->toggle = $label;
        } else {
            $this->toggle = new Button($label);
            $this->entity->setEntityName($label);
        }

        $this->toggle->attributes->addAttribute('data-toggle', 'dropdown');
        $this->toggle->attributes->addAttribute('aria-haspopup', true);
        $this->toggle->attributes->addAttribute('aria-expanded', false);
        $this->toggle->attributes->addAttributeClass('dropdown-toggle');

        return $this;
    }
934403
public function &addControl($control, $name='', $label = '', $value = '', $description = '', $unbound = false)
    {
        $string = new CamelCase($control);

        $control = $this->factory->create('FormDesigner\Controls\\' . $string->camelize() . 'Control');

        // Set name
        $control->setName($name);

        // set contols name
        if ($unbound && method_exists($control, 'setUnbound')) {
            $control->setUnbound();
            $control->removename();
        }

        // Label set?
        if (! empty($label) && method_exists($control, 'setLabel')) {
            $control->setLabel($label);
        }

        if (! empty($value) && method_exists($control, 'setValue')) {
            $control->setValue($value);
        }

        if (! empty($description) && method_exists($control, 'setDescription')) {
            $control->setDescription($description);
        }

        if ($control instanceof Button) {
            $control->noLabel();
        }

        // Create element
        $this->elementFactory('control', $control);

        return $control;
    }
662572
public function addDate($name, $label = '', $format = null, $attr = [])
    {
        $c = new Column\Date($name, $label, $format, $attr);
        $this->addColumn($c);
        return $c;
    }
653821
public function addButtonEdit($link = '#', $binds = [], $is_remote = true, $method = 'post')
    {


        $c = new Column\Button(configurator()->get('button.edit.name'), configurator()->get('button.edit.label'), $link, $binds);
        $c->setOptionAsPrimary();
        $c->icon(configurator()->get('button.edit.icon'));
        if ($is_remote) {
            $c->enableRemote($method);
        }

        $this->addColumn($c);
        return $c;
    }
877400
public static function button(
        string $label, 
        string $type = "submit", 
        string $onclick = null, 
        array $attributes = []
    ) : string
    {
        $buttonPreAttributes = [
            "type" => $type,
        ];
        
        if ($onclick) {
            $buttonPreAttributes["onclick"] = $onclick;
        }
        $buttonAttributes = array_merge($buttonPreAttributes, $attributes);        
        
        return self::tag("button", $label, $buttonAttributes);
    }
1343382
public function add($name, $label = null, $orderby = false)
    {
        $column = new Column($name, $label, $orderby);
        $this->columns[$column->name] = $column;
        if (!in_array($name,array("_edit"))) {
            $this->headers[] = $label;
        }
        if ($orderby) {
            $this->addOrderBy($column->orderby_field);
        }
        return $column;
    }
760764
public function addNumber($name, $label = '', $decimal = 2)
    {
        $c = new Column\Number($name, $label, $decimal);
        $this->addColumn($c);
        return $c;
    }
242201
protected function addRelation($name, $builder, $label = '')
    {
        $relation = new Relation($name, $builder, $label);

        $relation->setParent($this);

        $this->overwriteExistingRelation($name);

        return tap($relation, function ($relation) {
            $this->relations->push($relation);
        });
    }
1018444
public function column($name, $label = '')
    {
        $relationName = $relationColumn = '';

        if (false !== strpos($name, '.')) {
            list($relationName, $relationColumn) = explode('.', $name);

            $relation = $this->model()->eloquent()->$relationName();

            $label = empty($label) ? ucfirst($relationColumn) : $label;

            $name = snake_case($relationName).'.'.$relationColumn;
        }

        $column = $this->addColumn($name, $label);

        if (isset($relation) && $relation instanceof Relation) {
            $this->model()->with($relationName);
            $column->setRelation($relationName, $relationColumn);
        }

        return $column;
    }
6424
public function addTel($name, $label = '', $is_mandatory = true)
    {
        $e = new \FrenchFrogs\Form\Element\Tel($name, $label);
        $this->addElement($e);
        $e->addRule('laravel','laravel', ['regex:/^[+]{0,1}[0-9]{9,13}$/'],['regex' => 'Le champ doit être un numero valide . Il peut commencer par un + et ne doit contenir que des chiffres (Au moins 10)']);

        if ($is_mandatory) {
            $e->addRule('required');
        } else {
            $e->addFilter('nullable');
        }

        return $e;
    }
339270
public function file($name, $label, $attr = array())
    {
        return $this->input(
            $name,
            $label,
            array_merge(
                $attr,
                array('type' => 'file')
            )
        );
    }
259813
public function relation($name, $label, $builder = null)
    {
        if (is_null($builder)) {
            $builder = $label;
            $label = '';
        }

        return $this->addRelation($name, $builder, $label);
    }
306518
public function addLabel($name, $label = '', $attr = [] )
    {
        $e = new \FrenchFrogs\Form\Element\Label($name, $label, $attr);
        $this->addElement($e);
        return $e;
    }
1201665
public function addColumn($name, $label = null)
	{
		if (!$this->rowPrimaryKey) {
			$this->rowPrimaryKey = $name;
		}

		$label = $label ? $this->translate($label) : ucfirst($name);
		return $this->columns[$name] = new Column($name, $label, $this);
	}