Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f62269629b | ||
|
|
2516472b3f | ||
|
|
828da38dcd | ||
|
|
292a4787a4 | ||
|
|
b6b3693586 | ||
|
|
acb21a9364 | ||
|
|
b5d6fdedb6 | ||
|
|
9ab4568241 | ||
|
|
575d891b64 |
No files matched your search
+22
-8
@@ -3,8 +3,8 @@
|
|||||||
namespace Collective\Html;
|
namespace Collective\Html;
|
||||||
|
|
||||||
use DateTime;
|
use DateTime;
|
||||||
use Illuminate\Routing\UrlGenerator;
|
use Illuminate\Contracts\Routing\UrlGenerator;
|
||||||
use Illuminate\Session\Store as Session;
|
use Illuminate\Session\SessionInterface;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Illuminate\Support\Traits\Macroable;
|
use Illuminate\Support\Traits\Macroable;
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@ class FormBuilder
|
|||||||
/**
|
/**
|
||||||
* The URL generator instance.
|
* The URL generator instance.
|
||||||
*
|
*
|
||||||
* @var \Illuminate\Routing\UrlGenerator
|
* @var \Illuminate\Contracts\Routing\UrlGenerator
|
||||||
*/
|
*/
|
||||||
protected $url;
|
protected $url;
|
||||||
|
|
||||||
@@ -36,7 +36,7 @@ class FormBuilder
|
|||||||
/**
|
/**
|
||||||
* The session store implementation.
|
* The session store implementation.
|
||||||
*
|
*
|
||||||
* @var \Illuminate\Session\Store
|
* @var \Illuminate\Session\SessionInterface
|
||||||
*/
|
*/
|
||||||
protected $session;
|
protected $session;
|
||||||
|
|
||||||
@@ -78,7 +78,7 @@ class FormBuilder
|
|||||||
/**
|
/**
|
||||||
* Create a new form builder instance.
|
* Create a new form builder instance.
|
||||||
*
|
*
|
||||||
* @param \Illuminate\Routing\UrlGenerator $url
|
* @param \Illuminate\Contracts\Routing\UrlGenerator $url
|
||||||
* @param \Collective\Html\HtmlBuilder $html
|
* @param \Collective\Html\HtmlBuilder $html
|
||||||
* @param string $csrfToken
|
* @param string $csrfToken
|
||||||
*
|
*
|
||||||
@@ -869,6 +869,20 @@ class FormBuilder
|
|||||||
return $this->input('image', $name, null, $attributes);
|
return $this->input('image', $name, null, $attributes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a color input field.
|
||||||
|
*
|
||||||
|
* @param string $name
|
||||||
|
* @param string $value
|
||||||
|
* @param array $options
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function color($name, $value = null, $options = [])
|
||||||
|
{
|
||||||
|
return $this->input('color', $name, $value, $options);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a submit button element.
|
* Create a submit button element.
|
||||||
*
|
*
|
||||||
@@ -1116,7 +1130,7 @@ class FormBuilder
|
|||||||
/**
|
/**
|
||||||
* Get the session store implementation.
|
* Get the session store implementation.
|
||||||
*
|
*
|
||||||
* @return \Illuminate\Session\Store $session
|
* @return \Illuminate\Session\SessionInterface $session
|
||||||
*/
|
*/
|
||||||
public function getSessionStore()
|
public function getSessionStore()
|
||||||
{
|
{
|
||||||
@@ -1126,11 +1140,11 @@ class FormBuilder
|
|||||||
/**
|
/**
|
||||||
* Set the session store implementation.
|
* Set the session store implementation.
|
||||||
*
|
*
|
||||||
* @param \Illuminate\Session\Store $session
|
* @param \Illuminate\Session\SessionInterface $session
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setSessionStore(Session $session)
|
public function setSessionStore(SessionInterface $session)
|
||||||
{
|
{
|
||||||
$this->session = $session;
|
$this->session = $session;
|
||||||
|
|
||||||
|
|||||||
+10
-4
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace Collective\Html;
|
namespace Collective\Html;
|
||||||
|
|
||||||
use Illuminate\Routing\UrlGenerator;
|
use Illuminate\Contracts\Routing\UrlGenerator;
|
||||||
use Illuminate\Support\Traits\Macroable;
|
use Illuminate\Support\Traits\Macroable;
|
||||||
|
|
||||||
class HtmlBuilder
|
class HtmlBuilder
|
||||||
@@ -12,14 +12,14 @@ class HtmlBuilder
|
|||||||
/**
|
/**
|
||||||
* The URL generator instance.
|
* The URL generator instance.
|
||||||
*
|
*
|
||||||
* @var \Illuminate\Routing\UrlGenerator
|
* @var \Illuminate\Contracts\Routing\UrlGenerator
|
||||||
*/
|
*/
|
||||||
protected $url;
|
protected $url;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new HTML builder instance.
|
* Create a new HTML builder instance.
|
||||||
*
|
*
|
||||||
* @param \Illuminate\Routing\UrlGenerator $url
|
* @param \Illuminate\Contracts\Routing\UrlGenerator $url
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@@ -294,7 +294,13 @@ class HtmlBuilder
|
|||||||
$html = "<dl{$attributes}>";
|
$html = "<dl{$attributes}>";
|
||||||
|
|
||||||
foreach ($list as $key => $value) {
|
foreach ($list as $key => $value) {
|
||||||
$html .= "<dt>$key</dt><dd>$value</dd>";
|
$value = (array) $value;
|
||||||
|
|
||||||
|
$html .= "<dt>$key</dt>";
|
||||||
|
|
||||||
|
foreach ($value as $v_key => $v_value) {
|
||||||
|
$html .= "<dd>$v_value</dd>";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$html .= '</dl>';
|
$html .= '</dl>';
|
||||||
|
|||||||
Reference in new issue
Block a user