/** * Create a Destroy Link * * @return string */ public function getDestroyLink() { $route = $this->getPrefix() . $this->getResourceName() . '.forcedestroy'; if (Route::has($route)) { return Form::open(['route' => [$route, $this->id], 'method' => 'post', 'style' => 'display: inline;']) . Form::submit('Delete', ['class' => 'btn btn-xs btn-danger']) . Form::close(); } }
/** * @param string $name * @param string $position * @param array $options * * @return $this */ public function submit($name, $position = "BL", $options = array()) { $options = array_merge(array("class" => "btn btn-primary"), $options); $this->button_container[$position][] = Form::submit($name, $options); return $this; }
/** * return a form with a nested action button * @param $url * @param $method * @param $name * @param string $position * @param array $attributes * @return $this */ public function formButton($url, $method, $name, $position = "BL", $attributes = array()) { $attributes = array_merge(array("class" => "btn btn-default"), $attributes); $this->button_container[$position][] = Form::open(array('url' => $url, 'method' => $method)) . Form::submit($name, $attributes) . Form::close(); return $this; }