diff --git a/src/FormBuilder.php b/src/FormBuilder.php
index c225569..968cfc1 100644
--- a/src/FormBuilder.php
+++ b/src/FormBuilder.php
@@ -319,6 +319,20 @@ class FormBuilder
return $this->input('hidden', $name, $value, $options);
}
+ /**
+ * Create a search input field.
+ *
+ * @param string $name
+ * @param string $value
+ * @param array $options
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ public function search($name, $value = null, $options = [])
+ {
+ return $this->input('search', $name, $value, $options);
+ }
+
/**
* Create an e-mail input field.
*
diff --git a/tests/FormBuilderTest.php b/tests/FormBuilderTest.php
index eeea737..e7af181 100644
--- a/tests/FormBuilderTest.php
+++ b/tests/FormBuilderTest.php
@@ -166,6 +166,17 @@ class FormBuilderTest extends PHPUnit_Framework_TestCase
$this->assertEquals('', $form3);
}
+ public function testFormSearch()
+ {
+ $form1 = $this->formBuilder->search('foo');
+ $form2 = $this->formBuilder->search('foo', 'foobar');
+ $form3 = $this->formBuilder->search('foo', null, ['class' => 'span2']);
+
+ $this->assertEquals('', $form1);
+ $this->assertEquals('', $form2);
+ $this->assertEquals('', $form3);
+ }
+
public function testFormEmail()
{
$form1 = $this->formBuilder->email('foo');